* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Arial, sans-serif;
}

body {
    background-color: #f0f0f5;
    color: #333;
}

.page-container {
    max-width: 1050px;
    margin: 0 auto;
    background-color: #fff;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
}

/* Header */

.header-top{
    display:grid;
    grid-template-columns: 220px 1fr 220px;

    align-items:center;

    padding:15px 20px;
}

.social-box{
    display:flex;
    align-items:center;
    gap:12px;

    justify-self:start;
}

.social-icon{
    width:55px;
    height:55px;
    object-fit:contain;
    cursor:pointer;
}

.social-icon:hover{
    transform:scale(1.05);
}

.weather-box{
    display:flex;
    align-items:center;
    gap:10px;
}
.logo-container{
    text-align:center;
    justify-self:center;
}

.main-logo{
    height:70px;
    display:block;
    margin:auto;
}

.site-slogan{
    margin-top:8px;
    font-size:14px;
}
.weather-icon{
    width:110px;
    height:auto;
}

.weather-box p{
     display:flex;
    align-items:center;
    gap:10px;
    justify-self:end;
}

.weather-box h2{
    font-size:28px;
    font-weight:400;
}
.top-banners{

    display:flex;

    justify-content:center;

    gap:10px;

    padding:10px 20px;
}

.top-banners img{

    width:48%;

    height:80px;

    object-fit:cover;
}
nav {
     background-color: #9389d9;
    color: white;
    display: flex;
    align-items: center;
    padding: 0 20px;
    height: 50px;
    justify-content: space-between;
}
.nav-links { 
    display: flex;
    list-style: none;
    align-items: center;
    gap: 20px; 
}
.nav-links li {
    display: flex;
    align-items: center;
}
.nav-links li:first-child{
    margin-right: 10px;
}
.nav-links li:last-child{
    margin-right: 30px;
}
.nav-links a { 
    color: white; 
    text-decoration: none; 
    font-weight: 600; 
    font-size: 0.9rem;
    display: flex;
    align-items: center;
}
.icon-nav { 
    width: 30px;
    height: 30px; 
    filter: brightness(0) invert(1); 
    object-fit: contain;
}
.icon-nav:hover { 
    opacity: 0.6;
    cursor: pointer;
}
.nav-right { 
    display: flex; 
    align-items: center; 
    gap: 15px; 
    height: 100%;
}
.icon{ 
    width:36px;
    height:36px;

    border-radius:50%;

    object-fit:cover;

    cursor:pointer;
}
.icon:hover { 
    opacity: 0.6; 
    cursor: pointer;
}

/* --- Layout Grid --- */
.main-layout {
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 25px;
    padding: 25px;
}

/* --- SIDEBAR --- */
.sidebar-item {
    margin-bottom: 25px;
    border: 1px solid #ddd;
    padding: 10px;
    background-color: #fff;
    border-radius: 4px;
}

.sidebar-item img {
    width: 100%;
    margin-bottom: 12px;
    display: block;
}

.sidebar-item h3 {
    font-size: 1rem;
    line-height: 1.4;
    margin-bottom: 8px;
    color: #000;
}

.sidebar-item p {
    font-size: 0.85rem;
    color: #555;
    line-height: 1.4;
}

/* --- Main Content --- */
.hero-post { 
    position: relative; 
    margin-bottom: 25px;
}
.hero-post img { 
    width: 100%; 
    border-radius: 4px; 
}
.hero-overlay {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
    color: white; padding: 20px;
}

/* --- Khung chứa tổng thể khu vực tin phụ --- */
.sub-news-container {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

/* HÀNG TRÊN: CHIA 2 CỘT*/
.sub-news-top {
    display: grid;
    grid-template-columns: 42% 1fr;
    gap: 12px;
}

.top-card {
    height: 160px;
    position: relative;
    border-radius: 3px;
    overflow: hidden;
}

/* Khối Vibe Coding */
.vibe-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.vibe-card .top-card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.45);
    color: white;
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.vibe-card .top-card-overlay h3 {
    font-size: 0.95rem;
    font-weight: bold;
    line-height: 1.3;
}
.vibe-card .top-card-overlay p {
    font-size: 0.75rem;
    opacity: 0.85;
    margin-top: 4px;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Khối Tiêu Đề Tin Tức Khác */
.other-news-title-box {
    background-color: #fceee7;
    border: 1px solid #f5ded4;
}
.other-news-title-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.other-news-title-box .top-card-overlay {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    color: rgb(237, 237, 237);
    padding: 12px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}
.other-news-title-box h2 {
    font-size: 1.8rem;
    font-weight: 500;
    letter-spacing: 0.5px;
}

/*HÀNG DƯỚI: CHIA 3 CỘT ĐỀU*/
.sub-news-bottom {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
}

.bottom-card-item {
    height: 90px;
    position: relative;
    border: 1px solid #ddd;
    border-radius: 3px;
    overflow: hidden;
    background-color: #fff;
}

.bottom-card-item .card-bg-img {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    object-fit: cover;
    opacity: 0.35;
    z-index: 1;
}

.bottom-card-item .card-text-content {
    position: relative;
    z-index: 2;
    height: 100%;
    display: flex;
    align-items: center;
    padding: 10px 12px;
}

.bottom-card-item .card-text-content p {
    font-size: 0.82rem;
    font-weight: bold;
    color: #111;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.bottom-feature { 
    position: relative; 
    height: 350px; 
    background: #eee; 
}
.bottom-feature img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    opacity: 0.4; 
}
.bottom-content { 
    position: absolute; 
    bottom: 30px; 
    left: 30px; 
    right: 30px; 
}

/* --- Footer --- */
footer { 
    background-color: #b5aff0; 
    padding: 30px; 
    display: flex; 
    justify-content: space-between; 
    align-items: flex-end; 
}
.contact-line { 
    display: flex; 
    align-items: center; 
    gap: 10px; 
    margin-bottom: 5px; 
    font-weight: 500; 
}
.contact-line img { 
    height: 18px; 
}
/*Link dẫn đến bài báo*/
.link-news{
    color:white;
    text-decoration: none;
}
.link-news:hover{
    text-decoration: underline;
}



/*bài báo gemini*/

/* Tạo bố cục 2 cột: Cột nội dung (rộng hơn) và Cột bình luận */
.article-layout {
    display: grid;
    grid-template-columns: 1fr 320px; /* Cột bình luận cố định 320px */
    gap: 30px;
    padding: 25px;
    background-color: #fff;
}

/* Định dạng cột nội dung bài viết bên trái */
.article-content {
    background-color: #fffcf9; /* Màu nền hồng/kem nhạt như trong ảnh mẫu */
    padding: 25px 20px;
    border-radius: 4px;
}

.article-title {
    font-size: 1.65rem;
    font-weight: bold;
    color: #111;
    margin-bottom: 20px;
    line-height: 1.3;
}

.paragraph {
    font-size: 0.92rem;
    line-height: 1.6;
    color: #222;
    margin-bottom: 15px;
    text-align: justify;
}

.article-image-box {
    text-align: center;
    margin: 20px 0;
}

.article-img {
    max-width: 100%;
    height: auto;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

/* Định dạng khối bình luận bên phải */
.comment-sidebar{
    width:100%;
    position:sticky;
    top:20px;
    align-self:start;
}

.comment-container{

    background:#b4aef0;

    border:1px solid #7d77be;

    border-radius:3px;

    padding:15px;

    min-height:550px;

    display:flex;
    flex-direction:column;
}

.comment-heading{

    text-align:center;

    font-size:18px;

    font-weight:700;

    margin-bottom:20px;
}

.comment-list{

    flex:1;

    display:flex;

    flex-direction:column;

    gap:18px;
}

.comment-item{

    display:flex;

    gap:10px;
}

.comment-avatar{

    width:34px;

    height:34px;

    border-radius:50%;

    object-fit:cover;

    flex-shrink:0;
}

.comment-body{
    flex:1;
}

.comment-user{

    font-size:14px;

    line-height:1.4;

    color:#333;
}

.comment-text{
    font-weight:400;
}

.comment-action{

    display:flex;

    align-items:center;

    gap:6px;

    margin-top:5px;

    font-size:12px;
}

.like-icon{

    width:13px;

    height:13px;

    object-fit:contain;
}

.like-count{
    margin-right:8px;
}

.reply-btn{
    font-weight:600;
    cursor:pointer;
}

.comment-input-box{

    margin-top:auto;

    display:flex;

    align-items:center;

    gap:10px;
}

.input-avatar{

    width:35px;

    height:35px;

    border-radius:50%;

    object-fit:cover;
}

.comment-input{

    flex:1;

    height:40px;

    border-radius:20px;

    border:1px solid #777;

    padding:0 15px;

    outline:none;
}

.comment-input:disabled{

    background:#f5f5f5;

    cursor:not-allowed;
}
/* GIAO DIỆN MÀN HÌNH ĐĂNG NHẬP*/

/* Định dạng nền toàn trang đăng nhập (Căn giữa tuyệt đối khung thẻ vào giữa màn hình) */
.login-page {
    background-color: #f0f0f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh; /* Kéo full chiều cao trình duyệt */
    margin: 0;
    padding: 20px;
}

/* Khung hộp đăng nhập màu xám nhạt như ảnh mẫu */
.login-card {
    background-color: #dcdcdc; /* Màu xám nền hộp đăng nhập */
    width: 100%;
    max-width: 380px; /* Độ rộng tối đa gọn gàng giống mẫu */
    padding: 40px 30px;
    border-radius: 4px;
    text-align: center;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

/* Định dạng khu vực Logo trong Form */
.login-logo-box {
    margin-bottom: 25px;
}

.login-logo {
    height: 42px; /* Kích thước logo thu nhỏ cân đối */
    object-fit: contain;
}

.login-slogan {
    font-size: 9px;
    color: #666;
    margin-top: 4px;
    letter-spacing: 0.3px;
}

/* Chữ Đăng nhập chính giữa */
.login-title {
    font-size: 1.5rem;
    font-weight: 500;
    color: #000;
    margin-bottom: 25px;
}

/* Khung bao bọc các ô Input */
.login-form {
    display: flex;
    flex-direction: column;
    gap: 15px; /* Tạo khoảng cách đều giữa các ô */
}

.input-group input {
    width: 100%;
    padding: 10px 12px;
    font-size: 0.9rem;
    border: 1px solid #ccc;
    border-radius: 4px; /* Góc bo nhẹ theo ảnh */
    outline: none;
    background-color: #fff;
    transition: border-color 0.2s;
}

/* Hiệu ứng đổi màu nhẹ khi người dùng click vào ô nhập */
.input-group input:focus {
    border-color: #9389d9;
}

/* Định dạng nút Đăng nhập hình bầu dục màu xám đậm */
.btn-login {
    background-color: #a9a9a9; /* Màu xám nút bấm */
    color: #000;
    border: none;
    padding: 10px 30px;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 20px; /* Tạo hình bo tròn dẹt (oval) chuẩn thiết kế */
    cursor: pointer;
    margin: 15px auto 0 auto; /* Đẩy căn giữa nút bấm */
    width: fit-content; /* Nút thun nhỏ lại theo chữ thay vì tràn viền */
    transition: background-color 0.2s, transform 0.1s;
}

/* Hiệu ứng phản hồi khi di chuột hoặc click nút */
.btn-login:hover {
    background-color: #969696;
}

.btn-login:active {
    transform: scale(0.98); /* Nhấp nhẹ tạo cảm giác bấm thật */
}
/* Giao diện menu người dùng khi click vào icon người dùng ở góc phải trên cùng */
nav{
    overflow: visible;
}
.nav-links li a:hover{
    color: rgb(59, 56, 56);
    background-color: #777;
    padding: 15px 20px;
}
.nav-right{
    overflow: visible;
}

.user-menu{
    position: relative;
}

#user-info{
    position: absolute;
    top: 38px;
    right: 0;
    display: none;
    z-index: 999;
}

.user-menu:hover #user-info{
    display: block;
}

.account-box{
    width: 180px;
    background: white;
    border-radius: 8px;
    padding: 12px;

    display: flex;
    flex-direction: column;
    gap: 10px;

    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.account-name{
    color: black;
    font-size: 14px;
    font-weight: 600;
}

.account-box button{
    border: none;
    background: #9389d9;
    color: white;
    padding: 8px;
    border-radius: 6px;
    cursor: pointer;
}

.account-box button:hover{
    opacity: 0.85;
}