.profile-container {
  width: 80%;
  max-width: 900px;
  color: #fff; 
  font-family: 'Arial', sans-serif;
  margin: auto;
  margin-top: 3px;
  margin-bottom: 30px;
}

.header {
    position: relative;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 300px; /* tăng thêm chiều cao */
}

.back-btn {
    position: fixed;      /* fixed: luôn sát viewport */
    left: 12px;           /* khoảng cách từ mép trái trang */
    top: 95px;            /* khoảng cách từ mép trên trang — thay đổi nếu cần */
    background: black;
    color: grey;
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    font-size: 18px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
    z-index: 9999;
    box-shadow: 0 2px 6px rgba(0,0,0,0.25);
    transition: transform .12s ease, background .12s;
}

.back-btn:hover { transform: scale(1.05); color: red; }

.avatar {
    position: absolute;
    bottom: -30px; /* avatar trồi ra khỏi header */
    left: 50%;
    transform: translateX(-50%);
    width: 150px;
    height: 150px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #151515;
}

.profile-info {
    margin-top: 30px; 
    text-align: center;
}

.profile-info h2 {
    margin: 5px 0 15px;
    font-size: 1.6rem;
}

.profile-info .name {
    color: #aaa;
    margin: 5px 0 10px;
}

.buttons {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
}

.edit-btn{
    border: none;
    padding: 10px 16px;      /* đồng bộ */
    border-radius: 8px;      /* đồng bộ */
    cursor: pointer;
    font-weight: 600;        /* đồng bộ */
    font-size: 1rem;         /* đồng bộ */
    display: inline-block;
    background-color: #fae206;
    color: #151515;
}

.add-btn {
    background-color: #e5145d;
    color: #fff;
     border: none;
    padding: 10.6px 16px;      /* đồng bộ */
    border-radius: 8px;      /* đồng bộ */
    cursor: pointer;
    font-weight: 600;        /* đồng bộ */
    font-size: 1rem;         /* đồng bộ */
    display: inline-block;
}

.bank-btn {
    background-color: #202eec;
    color: #fff;
     border: none;
    padding: 10.5px 16px;      /* đồng bộ */
    border-radius: 8px;      /* đồng bộ */
    cursor: pointer;
    font-weight: 600;        /* đồng bộ */
    font-size: 1rem;         /* đồng bộ */
    display: inline-block;
    text-decoration: none;
}

.setting-btn, .share-btn {
    background-color: #222;
    color: #fff;
}

.stats {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 10px;
    font-size: 0.95rem;
}

.stats span {
    color: #ccc;
}

.bio {
    color: #aaa;
    margin-top: 5px;
    text-align: center;
}

.tabs {
    display: flex;
    justify-content: center;
    gap: 40px;
    border-bottom: 1px solid #333;
    margin-top: 25px;
    padding-bottom: 10px;
    color: #aaa;
}

.tabs .active {
    color: #fff;
    border-bottom: 2px solid #fff;
    padding-bottom: 4px;
}

.write-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 2%;
    padding-bottom: 40px;
}

.write-item {
    position: relative;              /* cần thiết để định vị phần con */
    background-color: #1a1a1a;
    border: 1px solid #2c2c2c;
    border-radius: 12px;
    padding: 16px;
    /* width: 38%; */
    width: calc(50% - 20px);
    min-height: 150px;               /* giúp card cao đều */
    color: #e0e0e0;
    text-align: left;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    box-sizing: border-box;
}

.write-item:hover {
    background-color: #222;
    border-color: #3a3a3a;
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    transform: translateY(-3px);
}
.write-item h2 {
    margin-top: 0;
    font-size: 1.1rem; 
    color: #fff;
    margin-bottom: 8px;
}
.write-item h3 {
    font-size: 16px;
    margin-bottom: 35px;             /* chừa khoảng trống cho phần like/comment */
    color: #ffffff;
    line-height: 1.4;
}

.write-item span {
    position: absolute;              /* cố định vị trí */
    bottom: 10px;                    /* sát cạnh dưới */
    right: 16px;                     /* căn phải */
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #aaa;
}
.card-mini-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.card-mini-header img {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ff2d55; /* Viền đỏ/hồng cho nổi bật */
}

.card-mini-header strong {
    font-size: 0.95rem;
    color: #fff;
}

.card-divider {
    height: 2px;
    width: 100%;
    background: linear-gradient(to right, red, orange);
    margin-bottom: 15px;
    border-radius: 2px;
    opacity: 0.8;
}
.tabs a {
    text-decoration: none;
    color: #aaa;
    display: flex;
    align-items: center; /* Giữ icon và chữ căn giữa */
    gap: 6px;
    padding-bottom: 4px; /* Đồng bộ với border-bottom của active */
}
.tabs .active,
.tabs .tab-select-wrapper.active { 
    color: #fff;
    border-bottom: 2px solid #fff;
    padding-bottom: 4px; 
}

.tabs a:hover {
  color: #d33;                  /* Màu khi hover, tuỳ bạn chỉnh */
}

.write-item {
    display: block;
    cursor: pointer;
}
.write-item:hover {
    background: #1a1a1a; 
}

#follow-btn {
    padding: 10px 20px;
    border-radius: 12px;
    background: #ff2d55;
    border: none;
    color: white;
    cursor: pointer;
    transition: 0.2s;
    font-weight: bold;
    font-size: 1rem;
}
#follow-btn.not-following {
    background-color: #ff2d55;
    color: white;
}

#follow-btn.following {
    background-color: #333;
    border: 1px solid #555;
    color: #fff;
    display: inline-block;
    text-align: center;
    border-radius: 6px;
    padding: 8px 14px;
    transition: background-color 0.3s, color 0.3s;
   
}
#follow-btn i {
    font-size: 1rem;
}
.tab-select-wrapper {
    position: relative; /* QUAN TRỌNG: Để định vị menu con */
    display: flex;
    align-items: center; /* Căn giữa icon và chữ */
    gap: 6px;
    cursor: pointer;
    color: #aaa;
    padding-bottom: 4px; 
    border-bottom: 2px solid transparent; 
    transition: all 0.2s;
    z-index: 10; /* Đảm bảo menu nằm trên các thành phần khác */
}

.tab-select-wrapper:hover {
    color: #d33; /* Giống hover của thẻ a */
}

.tab-select-wrapper select.tab {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    border: none;
    background-color: #000000; /* 🔥 MÀU NỀN ĐEN theo yêu cầu */
    color: #fff; /* Màu chữ trắng để nổi bật trên nền đen */
    font-size: 1rem;
    font-family: inherit;
    font-weight: normal; 
    padding: 0 5px; /* Thêm padding ngang nhẹ */
    margin-left: -5px; /* Dịch sang trái 1 chút để select dính vào icon hơn */
    vertical-align: middle; 
    line-height: normal;
    transform: translateY(1px); /* Tinh chỉnh nhỏ để căn giữa hoàn hảo */
    cursor: pointer;
}
.dropdown-options {
    list-style: none;
    position: absolute;
    top: 100%; /* Đặt menu bên dưới tab */
    left: -10px; /* Dịch sang trái 1 chút cho cân đối */
    min-width: 180px;
    background-color: #242526; /* Màu nền tối, nổi nhẹ trên nền trang */
    border: 1px solid #444;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    padding: 5px 0;
    margin-top: 5px;
    z-index: 100;
}

.dropdown-options li {
    padding: 8px 15px;
    color: #ccc; /* Màu chữ mặc định */
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s;
    white-space: nowrap;
}

.dropdown-options li:hover {
    background-color: #3a3b3c; /* Màu hover */
    color: #fff;
}

.dropdown-options li.selected {
    color: #ff2d55; /* Màu accent cho mục đang chọn */
}

.follow-modal {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0,0,0,0.65);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
}
.follow-modal-content {
    width: 90%;
    max-width: 420px;
    background: #141414;
    padding: 20px;
    border-radius: 12px;
    color: white;
    position: relative;
}
.close-follow-modal {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 24px;
    cursor: pointer;
}
.follow-item {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}
.follow-item img {
    width: 45px; height: 45px;
    border-radius: 50%;
    margin-right: 12px;
}
.follow-item .username {
    font-size: 16px;
    font-weight: 600;

}
.follow-item {
    cursor: pointer;
    transition: 0.2s;
}
.follow-item:hover {
    background: #1e1e1e;
    border-radius: 8px;
    padding: 5px;
}
