:root {
    --gold: #C5A059;
    --dark: #000;
}

html {
    scroll-behavior: smooth;
}

.logo a {
    color: var(--gold);
    text-decoration: none;
}

.logo a span {
    color: #fff;
}

/* ================= HEADER ================= */
.main-header {
    width: 100%;
    background: #000;
    position: sticky;
    top: 0;
    z-index: 999;
    border-bottom: 1px solid #111;
}

/* ================= NAVBAR ================= */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 5%;
}

/* ================= LOGO ================= */
.logo {
    font-size: 1.3rem;
    font-weight: bold;
    color: var(--gold);
    letter-spacing: 1px;
}

.logo span {
    color: #fff;
}

/* ================= NAV LINKS ================= */
.nav-links {
    display: flex;
    align-items: center;
    gap: 25px;
}

.nav-links a {
    color: #fff;
    text-decoration: none;
    font-size: 0.95rem;
    transition: 0.3s;
    position: relative;
}

.nav-links a:hover {
    color: var(--gold);
}

.nav-links a.active {
    color: var(--gold);
}

.nav-links a.active::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -6px;
    width: 100%;
    height: 2px;
    background: var(--gold);
}

/* ================= RIGHT SIDE ================= */
.nav-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.nav-right i {
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}

/* ================= MINI CHATBOX ================= */
.chat-menu{
    position:relative;
}

.chat-btn{
    position:relative;
    width:38px;
    height:38px;
    border-radius:50%;
    border:none;
    background:#111;
    color:#fff;
    cursor:pointer;
    transition:0.3s;
}

.chat-btn:hover{
    background:#1b1b1b;
    color:var(--gold);
    transform:translateY(-2px);
}

.msg-badge{
    position:absolute;
    top:-4px;
    right:-4px;
    background:var(--gold);
    color:#000;
    font-size:11px;
    font-weight:700;
    min-width:18px;
    height:18px;
    border-radius:50%;
    display:flex;
    align-items:center;
    justify-content:center;
    border:2px solid #000;
}

.chat-box{
    position:absolute;
    top:50px;
    right:0;
    width:360px;
    background:#0d0d0d;
    border:1px solid #333;
    border-radius:18px;
    display:none;
    overflow:hidden;
    z-index:9999;
    box-shadow:0 18px 45px rgba(0,0,0,0.5);
}

.chat-menu.active .chat-box{
    display:block;
}

.mini-chat-header{
    padding:16px;
    background:#111;
    border-bottom:1px solid #222;
    display:flex;
    justify-content:space-between;
    align-items:center;
}

.mini-chat-header h4{
    margin:0;
    color:#fff;
    font-size:15px;
}

.mini-chat-header span{
    color:var(--gold);
    font-size:12px;
}

.mini-chat-header i{
    color:var(--gold);
    font-size:22px;
}

.mini-chat-body{
    height:260px;
    padding:16px;
    display:flex;
    flex-direction:column;
    gap:12px;
    overflow-y:auto;
}

.mini-message{
    max-width:82%;
    padding:11px 13px;
    border-radius:15px;
}

.mini-message p{
    margin:0;
    font-size:13px;
    line-height:1.4;
}

.mini-message small{
    display:block;
    margin-top:6px;
    font-size:10px;
    opacity:0.7;
}

.mini-message.admin{
    background:#171717;
    color:#fff;
    border:1px solid #242424;
    border-bottom-left-radius:5px;
}

.mini-message.user{
    background:var(--gold);
    color:#000;
    align-self:flex-end;
    border-bottom-right-radius:5px;
}

.mini-chat-form{
    padding:12px;
    border-top:1px solid #222;
    display:flex;
    gap:8px;
    background:#111;
}

.mini-chat-form input{
    flex:1;
    background:#181818;
    border:1px solid #292929;
    outline:none;
    color:#fff;
    padding:11px 14px;
    border-radius:30px;
    font-size:13px;
}

.mini-chat-form button{
    width:40px;
    height:40px;
    border:none;
    border-radius:50%;
    background:var(--gold);
    color:#000;
    cursor:pointer;
}

.nav-right i:hover {
    color: var(--gold);
}

/* ================= BUTTON ================= */
.signin-btn {
    background: var(--gold);
    color: #000;
    text-decoration: none;
    padding: 9px 20px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: bold;
    transition: 0.3s;
}

.signin-btn:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.profile-menu{
    position:relative;
}

.profile-btn{
    background:var(--gold);
    color:#000;

    border:none;

    padding:10px 18px;

    border-radius:30px;

    font-weight:700;

    cursor:pointer;
}

.profile-dropdown{
    position:absolute;

    top:50px;
    right:0;

    width:220px;

    background:#111;

    border:1px solid #333;

    border-radius:15px;

    padding:12px;

    display:none;

    z-index:999;
}

.profile-dropdown p{
    color:#999;
    font-size:13px;

    border-bottom:1px solid #222;

    padding-bottom:10px;
    margin-bottom:10px;
}

.profile-dropdown a{
    display:block;

    color:#fff;
    text-decoration:none;

    padding:10px;

    border-radius:10px;

    transition:0.3s;
}

.profile-dropdown a:hover{
    background:#222;
    color:var(--gold);
}

.profile-menu.active .profile-dropdown{
    display:block;
}

/* ================= RESPONSIVE ================= */
@media (max-width: 768px) {

    .navbar {
        flex-direction: column;
        gap: 20px;
    }

    .nav-links {
        flex-wrap: wrap;
        justify-content: center;
        gap: 15px;
    }

    .nav-right {
        justify-content: center;
    }
}

.user-notif-menu {
    position: relative;
}

.user-notif-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 18px;
    cursor: pointer;
    position: relative;
}

.notif-badge {
    position: absolute;
    top: -8px;
    right: -9px;
    background: #d4a017;
    color: #000;
    font-size: 10px;
    font-weight: 800;
    border-radius: 50%;
    min-width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.user-notif-dropdown {
    position: absolute;
    top: 35px;
    right: 0;
    width: 340px;
    max-height: 520px;

    background: #111;

    border: 1px solid rgba(212,160,23,.25);
    border-radius: 18px;

    display: none;

    z-index: 9999;

    overflow: hidden;

    box-shadow: 0 18px 45px rgba(0,0,0,.45);
}

.user-notif-list{
    max-height: 430px;
    overflow-y: auto;

    scrollbar-width: thin;
    scrollbar-color: #d4a017 #151515;
}

/* CHROME SCROLLBAR */
.user-notif-list::-webkit-scrollbar{
    width: 6px;
}

.user-notif-list::-webkit-scrollbar-track{
    background: #151515;
}

.user-notif-list::-webkit-scrollbar-thumb{
    background: #d4a017;
    border-radius: 20px;
}

/* HOVER EFFECT */
.user-notif-item{
    transition: .2s ease;
}

.user-notif-item:hover{
    background: rgba(212,160,23,.08);
}

/* BETTER UNREAD */
.user-notif-item.unread{
    background: rgba(212,160,23,.12);
    border-left: 3px solid #d4a017;
}

/* BETTER TEXT */
.user-notif-item p{
    margin: 0;
    font-size: 13px;
    line-height: 1.5;
}

.user-notif-item small{
    display: block;
    margin-top: 5px;
    color: #888;
    font-size: 11px;
}

.user-notif-menu.active .user-notif-dropdown {
    display: block;
}

.user-notif-header {
    padding: 16px;
    border-bottom: 1px solid #222;
    display: flex;
    justify-content: space-between;
}

.user-notif-header h4 {
    margin: 0;
    color: #fff;
}

.user-notif-header span {
    color: #d4a017;
    font-size: 12px;
    font-weight: 700;
}

.user-notif-item {
    display: flex;
    gap: 12px;
    padding: 14px 16px;
    color: #fff;
    text-decoration: none;
    border-bottom: 1px solid #1f1f1f;
}

.user-notif-item.unread {
    background: rgba(212,160,23,.12);
}

.user-notif-item i {
    color: #d4a017;
    margin-top: 4px;
}

.user-notif-item p {
    margin: 0;
    font-size: 13px;
}

.user-notif-item small {
    color: #888;
    font-size: 11px;
}

.user-notif-empty {
    padding: 35px;
    text-align: center;
    color: #888;
}

/* ================= MOBILE HEADER RESPONSIVE ================= */
.mobile-menu-btn {
    display: none;
    background: #111;
    color: #fff;
    border: 1px solid #222;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    font-size: 18px;
    cursor: pointer;
}

.mobile-menu-btn:hover {
    color: var(--gold);
}

@media (max-width: 768px) {

    .navbar {
        position: relative;
        flex-direction: row;
        padding: 14px 18px;
        gap: 12px;
    }

    .logo {
        font-size: 1.05rem;
        flex: 1;
    }

    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
        order: 2;
    }

    .nav-right {
        order: 1;
        gap: 10px;
        margin-left: auto;
    }

    .nav-links {
        position: absolute;
        top: 70px;
        left: 18px;
        right: 18px;

        display: none;
        flex-direction: column;
        align-items: stretch;
        gap: 0;

        background: #0d0d0d;
        border: 1px solid #222;
        border-radius: 16px;
        padding: 10px;
        z-index: 9998;
        box-shadow: 0 18px 45px rgba(0,0,0,.45);
    }

    .navbar.mobile-active .nav-links {
        display: flex;
    }

    .nav-links a {
        padding: 13px 14px;
        border-radius: 12px;
        font-size: 0.9rem;
    }

    .nav-links a:hover,
    .nav-links a.active {
        background: rgba(197,160,89,.12);
    }

    .nav-links a.active::after {
        display: none;
    }

    .chat-btn,
    .user-notif-btn {
        width: 38px;
        height: 38px;
        background: #111;
        border-radius: 50%;
    }

    .profile-btn {
        padding: 10px 13px;
        max-width: 95px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .signin-btn {
        padding: 10px 15px;
        font-size: 0.82rem;
    }

    .chat-box,
    .user-notif-dropdown,
    .profile-dropdown {
        position: fixed;
        top: 72px;
        left: 12px;
        right: 12px;
        width: auto;
        max-width: none;
        border-radius: 16px;
    }

    .mini-chat-body {
        height: 300px;
    }

    .user-notif-dropdown {
        max-height: 75vh;
    }

    .user-notif-list {
        max-height: 60vh;
    }
}

@media (max-width: 420px) {

    .navbar {
        padding: 12px 14px;
    }

    .logo {
        font-size: 0.95rem;
        letter-spacing: 0.5px;
    }

    .nav-right {
        gap: 7px;
    }

    .mobile-menu-btn {
        width: 37px;
        height: 37px;
        font-size: 16px;
    }

    .chat-btn,
    .user-notif-btn {
        width: 35px;
        height: 35px;
        font-size: 15px;
    }

    .profile-btn {
        max-width: 78px;
        padding: 9px 10px;
        font-size: 0.78rem;
    }

    .signin-btn {
        padding: 9px 12px;
        font-size: 0.78rem;
    }

    .nav-links {
        top: 62px;
        left: 12px;
        right: 12px;
    }

    .chat-box,
    .user-notif-dropdown,
    .profile-dropdown {
        top: 64px;
        left: 10px;
        right: 10px;
    }

    .mini-chat-body {
        height: 270px;
        padding: 14px;
    }

    .mini-message {
        max-width: 88%;
    }

    .mini-chat-form input {
        min-width: 0;
    }
}

/* ================= HEADER AI ASSISTANT ================= */

.header-ai-menu {
    position: relative;
}

.header-ai-btn {
    position: relative;
    width: 38px;
    height: 38px;
    border: none;
    border-radius: 50%;
    background: #111;
    color: #fff;
    cursor: pointer;
    transition: 0.25s ease;

    display: flex;
    align-items: center;
    justify-content: center;
}

.header-ai-btn span {
    display: none;
}

.header-ai-btn i {
    color: #fff;
    font-size: 16px;
}

.header-ai-btn:hover {
    background: #1b1b1b;
    transform: translateY(-2px);
}

.header-ai-btn:hover i {
    color: var(--gold);
}

.header-ai-box {
    display: none;
    position: absolute;
    top: 50px;
    right: 0;

    width: 380px;
    background: #0d0d0d;
    border: 1px solid #333;
    border-radius: 18px;
    overflow: hidden;
    z-index: 99999;

    box-shadow: 0 18px 45px rgba(0,0,0,0.5);
}

.header-ai-menu.active .header-ai-box {
    display: block;
}

.header-ai-head {
    padding: 16px;
    background: #111;
    border-bottom: 1px solid #222;

    display: flex;
    align-items: center;
    gap: 12px;
}

.ai-avatar {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    background: var(--gold);
    color: #000;

    display: flex;
    align-items: center;
    justify-content: center;

    font-size: 18px;
    flex-shrink: 0;
}

.header-ai-head strong {
    display: block;
    color: #fff;
    font-size: 15px;
    margin-bottom: 3px;
}

.header-ai-head small {
    color: #aaa;
    font-size: 11px;
    line-height: 1.4;
}

.header-ai-messages {
    height: 285px;
    padding: 16px;

    display: flex;
    flex-direction: column;
    gap: 10px;

    background: #0d0d0d;
    overflow-y: auto;

    scrollbar-width: thin;
    scrollbar-color: var(--gold) #151515;
}

.header-ai-messages::-webkit-scrollbar {
    width: 6px;
}

.header-ai-messages::-webkit-scrollbar-track {
    background: #151515;
}

.header-ai-messages::-webkit-scrollbar-thumb {
    background: var(--gold);
    border-radius: 20px;
}

.ai-msg {
    max-width: 84%;
    padding: 11px 13px;
    border-radius: 15px;

    font-size: 13px;
    line-height: 1.45;
    word-wrap: break-word;
}

.ai-msg.bot {
    align-self: flex-start;
    background: #171717;
    color: #fff;
    border: 1px solid #242424;
    border-bottom-left-radius: 5px;
}

.ai-msg.user {
    align-self: flex-end;
    background: var(--gold);
    color: #000;
    font-weight: 600;
    border-bottom-right-radius: 5px;
}

.ai-msg.typing {
    width: fit-content;
    min-width: 62px;
    display: flex;
    gap: 5px;
    align-items: center;
    justify-content: center;
}

.ai-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--gold);
    animation: aiTypingBounce 1.2s infinite;
}

.ai-dot:nth-child(2) {
    animation-delay: .18s;
}

.ai-dot:nth-child(3) {
    animation-delay: .36s;
}

@keyframes aiTypingBounce {
    0%, 80%, 100% {
        transform: translateY(0);
        opacity: .45;
    }

    40% {
        transform: translateY(-5px);
        opacity: 1;
    }
}

.header-ai-actions {
    padding: 12px 12px 12px;
    background: #111;

    display: flex;
    flex-wrap: wrap;
    gap: 7px;
}

.header-ai-actions button {
    border: 1px solid #292929;
    background: #181818;
    color: #fff;

    border-radius: 999px;
    padding: 8px 11px;

    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s ease;
}

.header-ai-actions button:hover {
    border-color: var(--gold);
    color: var(--gold);
    background: rgba(197,160,89,.08);
}

.header-ai-input {
    padding: 12px;
    border-top: 1px solid #222;
    background: #111;

    display: flex;
    gap: 8px;
}

.header-ai-input input {
    flex: 1;
    min-width: 0;

    background: #181818;
    border: 1px solid #292929;
    color: #fff;

    outline: none;
    padding: 11px 14px;
    border-radius: 30px;
    font-size: 13px;
}

.header-ai-input input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(197,160,89,.12);
}

.header-ai-input button {
    width: 40px;
    height: 40px;

    border: none;
    border-radius: 50%;
    background: var(--gold);
    color: #000;

    cursor: pointer;
    flex-shrink: 0;
}

.header-ai-input button i {
    color: #000;
}

/* AI RESPONSIVE */
@media (max-width: 768px) {
    .header-ai-box {
        position: fixed;
        top: 72px;
        left: 12px;
        right: 12px;

        width: auto;
        max-width: none;
        border-radius: 16px;
    }

    .header-ai-messages {
        height: 320px;
    }
}

@media (max-width: 420px) {
    .header-ai-box {
        top: 64px;
        left: 10px;
        right: 10px;
    }

    .header-ai-head {
        padding: 14px;
    }

    .header-ai-messages {
        height: 285px;
        padding: 14px;
    }

    .ai-msg {
        max-width: 88%;
        font-size: 12px;
    }

    .header-ai-actions button {
        font-size: 10.5px;
        padding: 7px 9px;
    }
}