/* Set up css giống Grok AI */
body {
    font-family: Arial, sans-serif;
    background-color: #f5f5f5;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
}

.container {
    text-align: center;
    padding: 20px;
    width: 100%;
    max-width: 400px;
}

.logo h1 {
    font-size: 36px;
    font-weight: bold;
    color: #000;
    margin-bottom: 30px;
}

.social-login {
    margin-bottom: 30px;
}

.social-btn {
    display: block;
    width: 100%;
    padding: 12px;
    margin-bottom: 10px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    color: #000;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.social-btn:hover {
    border-color: #999;
}

.login-form {
    display: flex;
    flex-direction: column;
    margin-bottom: 20px;
}

.login-form input {
    padding: 12px;
    margin-bottom: 15px;
    background-color: #e8ecef;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
}

.login-form input:focus {
    border-color: #007bff;
    outline: none;
}

.forgot-password {
    font-size: 14px;
    color: #007bff;
    text-decoration: none;
    margin-bottom: 20px;
    display: block;
}

.forgot-password:hover {
    text-decoration: underline;
}

.login-btn {
    padding: 12px;
    background-color: #fff;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    color: #000;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.login-btn:hover {
    border-color: #999;
}

.signup-text {
    font-size: 14px;
    color: #666;
    margin-bottom: 20px;
}

.signup-text a {
    color: #007bff;
    text-decoration: none;
}

.signup-text a:hover {
    text-decoration: underline;
}

.terms {
    font-size: 12px;
    color: #666;
}

.terms a {
    color: #666;
    text-decoration: none;
}

.terms a:hover {
    text-decoration: underline;
}

/* Thiết lập thanh điều hướng */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background-color: #333;
    color: white;
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000; /* Đảm bảo nằm trên cùng */
    box-sizing: border-box; /* Đảm bảo padding không làm tăng kích thước */
}

/* Nhóm bên trái */
.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0; /* Ngăn không cho phần này co lại */
}

/* Sửa phần nav-right để không bị cắt nội dung */
.nav-right {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap; /* Không cho phép xuống dòng để tránh bị cắt */
    align-items: center;
    justify-content: flex-end; /* Đẩy các link sang phải */
    flex-shrink: 0; /* Ngăn không cho phần này co lại */
    overflow: visible; /* Đảm bảo nội dung không bị cắt */
    white-space: nowrap; /* Ngăn không cho text bị ngắt dòng */
}

.nav-left .brand {
    color: white !important; /* Chỉnh màu chữ trắng */
    text-decoration: none;
    font-size: 24px;
    font-weight: bold;
}

/* Định dạng chung cho các nút điều hướng */
.nav-link {
    color: white;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.3s;
    white-space: nowrap; /* Ngăn text bị ngắt dòng */
}

.nav-link:hover {
    background-color: #444;
}

.content {
    max-width: 90%;
    min-width: 600px;
    margin: 80px auto 0; /* Tăng margin-top để tránh nội dung bị che bởi navbar */
    padding: 20px;
    z-index: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .navbar {
        padding: 15px;
    }

    .content {
        min-width: auto; /* Bỏ min-width cho màn hình nhỏ */
        max-width: 95%;
        margin-top: 70px;
    }

    .nav-right {
        gap: 5px;
    }

    .nav-link {
        padding: 6px 8px;
        font-size: 14px;
    }
}

/* Bỏ tất cả underline on a */
a {
    text-decoration: none;
}

/* ===== BREAKING NEWS ===== add 29/03/2025 */
.breaking-news {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin: 20px 0;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    width: 100%;
}

.breaking-label {
    background: #ff4757;
    color: white;
    padding: 8px 16px;
    border-radius: 8px 0 0 8px;
    font-weight: 700;
    font-size: 0.9em;
    white-space: nowrap;
}

.ticker-container {
    flex: 1;
    overflow: hidden;
    position: relative;
    padding: 10px 15px;
}

.ticker-content {
    display: inline-block;
    white-space: nowrap;
    animation: ticker 30s linear infinite;
    color: #2f3542;
    font-size: 0.95em;
}

.ticker-content span {
    margin-right: 40px;
}

@keyframes ticker {
    0% { transform: translateX(100%); }
    100% { transform: translateX(-100%); }
}

/* Responsive */
@media (max-width: 768px) {
    .breaking-label {
        padding: 6px 12px;
        font-size: 0.8em;
    }
    .ticker-content {
        font-size: 0.85em;
    }
}

/* ===== BREAKING NEWS PRO ===29 03 2025== */
/* ===== BREAKING NEWS PRO ===== */
#breaking-news-ticker {
    --ticker-red: #ff4757;
    --ticker-dark: #2f3542;
    --ticker-light: #f1f2f6;

    display: flex;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
    margin: 1rem 0;
    border-left: 4px solid var(--ticker-red);
}

.ticker-label {
    background: var(--ticker-red);
    color: white;
    padding: 0.5rem 1rem;
    font-weight: 700;
    font-size: 0.8em;
    display: flex;
    align-items: center;
}

.ticker-viewport {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.ticker-track {
    display: flex;
    height: 100%;
    will-change: transform;
}

.ticker-item {
    padding: 0.5rem 1rem;
    white-space: nowrap;
    display: flex;
    align-items: center;
    font-size: 0.95em;
    color: var(--ticker-dark);
}

.ticker-nav {
    display: flex;
    align-items: center;
    padding: 0 0.5rem;
}

.ticker-pause {
    background: transparent;
    border: none;
    cursor: pointer;
    font-size: 1em;
    color: var(--ticker-red);
    padding: 0.5rem;
}

/* Hiệu ứng responsive */
@media (max-width: 768px) {
    .ticker-label {
        padding: 0.5rem;
        font-size: 0.7em;
    }

    .ticker-item {
        font-size: 0.85em;
        padding: 0.5rem;
    }
}

/* Line X: Thêm vào cuối file */
.ticker-container {
    overflow: hidden;
    white-space: nowrap;
}
.ticker-content {
    display: inline-block;
}
.ticker-content span {
    display: inline-block;
    padding: 0 10px; /* Khoảng cách giữa các headline */
}

/* Line X: Cập nhật trong style.css */
.ticker-container {
    overflow: hidden;
    white-space: nowrap;
}
.ticker-track {
    display: inline-block;
    will-change: transform; /* Tối ưu GPU */
}
.ticker-item {
    display: inline-block;
    padding: 0 10px;
}
.ticker-nav {
    display: inline-block;
    vertical-align: middle;
}
.ticker-pause {
    cursor: pointer;
    border: none;
    background: none;
    font-size: 16px;
}

/* ================ KHUNG CHAT INPUT ================ */
cssCopy/* ================ KHUNG CHAT INPUT ================ */
.input-container {
    width: 100%;
    max-width: 100%; /* Thay đổi từ 800px thành 100% */
    margin: 0 auto;
    padding: 0 16px; /* Thêm padding để tránh sát mép */
}

.chat-input-wrapper {
    border: 1px solid #e0e0e0;
    border-radius: 16px;
    padding: 16px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    width: 100%; /* Đảm bảo độ rộng 100% */
}
/* Ô nhập văn bản */
.chat-input {
    width: 100%;
    border: none;
    resize: none;
    outline: none;
    font-size: 16px;
    line-height: 1.5;
    min-height: 80px; /* 2 dòng */
    max-height: 200px;
    padding: 0;
    margin: 0;
    font-family: inherit;
}

/* Dòng chứa nút bấm */
.input-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 12px;
}

/* ================ NÚT ATTACH FILE ================ */
.attach-btn {
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: all 0.2s;
    display: flex;
    align-items: center;
}

.attach-btn:hover {
    background: #f5f5f5;
}

.attach-btn svg {
    width: 24px;
    height: 24px;
}

/* ================ NÚT GỬI ================ */
.send-btn {
    background: #007bff;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.send-btn:hover {
    background: #0069d9;
    transform: scale(1.05);
}

.send-btn:active {
    transform: scale(0.95);
}

.send-btn svg {
    width: 20px;
    height: 20px;
}
/* ================ ẢNH PREVIEW ================ */
.image-preview-container {
    position: relative;
    margin-bottom: 16px;
    max-width: 80px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #eee;
    display: none; /* Ẩn ban đầu */
}

.image-preview {
    width: 100%;
    display: block;
}

.remove-image-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    border: none;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    font-size: 18px;
    cursor: pointer;
}

/* ================ RESPONSIVE ================ */
@media (max-width: 768px) {
    .chat-input-wrapper {
        padding: 12px;
        border-radius: 12px;
    }

    .chat-input {
        min-height: 60px;
    }

    .send-btn {
        width: 36px;
        height: 36px;
    }
}

/* ===== PREVIEW ẢNH KIỂU DEEPSEEK ===== */
.file-preview {
    width: 100%;
    max-width: 90px; /* Giảm từ 300px xuống 200px */
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 12px;
    background: #f9fafb;
    display: none; /* Ẩn ban đầu */
}

.preview-image {
    width: 100%;
    border-radius: 4px;
    max-height: 60px; /* Giảm từ 150px xuống 120px */
    object-fit: contain;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 8px;
    font-size: 14px;
    color: #666;
}

.remove-btn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #999;
}


/* Ẩn ban đầu */
.send-btn span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}
                            /* Css cho phần example button */
.example-question-buttons {
        display: flex;
        gap: 10px;
        margin: 20px 0;
        flex-wrap: wrap;
    }

    .example-btn {
        background-color: var(--background-color); /* Dùng màu nền chính */
        border: 1px solid #ddd;
        border-radius: 4px;
        padding: 10px 15px;
        cursor: pointer;
        transition: background-color 0.3s;
        font-size: 14px;
    }

    .example-btn:hover {
        background-color: #f0f0f0; /* Màu khi hover */
    }
                                /* Css cho phần example button--- End*/


/* Small screens: chỉ ẩn nút dành cho user đã đăng nhập; giữ Login/Register */
@media (max-width: 900px) {
    /* Mặc định hiển thị tất cả header-btn trên mobile */
    .nav-right .header-btn {
        display: inline-flex;
    }

    /* Ẩn các nút dành cho user đã đăng nhập */
    .nav-right .header-btn.auth-only {
        display: none;
    }

    .nav-right {
        gap: 8px;
    }
}

/* Compact guest language switcher (chưa login) */
#guest-lang-btn.grok-user-icon {
    width: 28px;
    height: 28px;
    font-size: 11px;
    border: 1px solid #f0a6d8;
}

#guest-lang-container .grok-dropdown-menu {
    min-width: 100px;
    padding: 6px 8px;
    border-radius: 10px;
}

#guest-lang-container .grok-lang-row {
    padding: 6px 6px 4px 6px;
    gap: 6px;
}

#guest-lang-container .grok-lang-btn {
    min-width: 44px;
    padding: 6px 10px;
    font-size: 12px;
    border-radius: 10px;
}



