/* CHỈ THÊM: CSS cho animation ngôi sao */
.sparkle {
    fill: rgb(85, 55, 218);
    opacity: 0;
    animation: sparkle 2s ease-in-out infinite;
}

.sparkle:nth-child(1) {
    animation-delay: 0s;
}

.sparkle:nth-child(2) {
    animation-delay: 0.3s;
}

.sparkle:nth-child(3) {
    animation-delay: 0.6s;
}

.sparkle:nth-child(4) {
    animation-delay: 0.9s;
}

.sparkle:nth-child(5) {
    animation-delay: 1.2s;
}

.sparkle:nth-child(6) {
    animation-delay: 1.5s;
}

@keyframes sparkle {
    0%,
    100% {
        opacity: 0;
        transform: scale(0.8);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* CSS cho header */
.sticky-header {
    position: sticky;
    top: 0;
    z-index: 1020;
    background-color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.nav-link {
    color: #3a00ff;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-link:hover {
    color: #00a8ff;
}

.navbar-nav .nav-item {
    margin: 0 10px;
}

.btn-login {
    color: #3a00ff;
    font-weight: 500;
    transition: color 0.3s ease;
}

.btn-login:hover {
    color: #00a8ff;
}

.account-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(106, 69, 209, 0.1);
    border: 1px solid rgba(106, 69, 209, 0.3);
    transition: all 0.3s ease;
}

.account-icon:hover {
    transform: scale(1.03);
}

.astrology-dropdown-menu {
    min-width: 200px;
    border: 1px solid rgba(106, 69, 209, 0.2);
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(106, 69, 209, 0.15);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(5px);
    padding: 8px 0;
    margin-top: 8px !important;
}

.astrology-dropdown-item {
    color: #2d3436;
    font-size: 0.875rem;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
}

.astrology-dropdown-item:hover {
    background: rgba(106, 69, 209, 0.08);
    color: #6a45d1;
    padding-left: 20px;
}

.astrology-dropdown-item i {
    margin-right: 10px;
    width: 18px;
    text-align: center;
    color: #6a45d1;
}

.astrology-logout {
    color: #e63946 !important;
    font-weight: 500;
}

.astrology-logout:hover {
    background: rgba(230, 57, 70, 0.08) !important;
    color: #e63946 !important;
}

.dropdown-divider {
    border-color: rgba(106, 69, 209, 0.1);
    margin: 5px 0;
}

.navbar-toggler {
    border: none;
    padding: 0;
}

.navbar-toggler:focus {
    outline: none;
    box-shadow: none;
}

@media (max-width: 991px) {
    .navbar-nav {
        padding: 10px 0;
    }

    .nav-item {
        margin: 5px 0;
    }

    .nav-link {
        padding: 10px 15px;
    }
}

.cosmic-text {
    font-family: "Poppins", sans-serif;
    font-size: 42px;
    font-weight: 600;
    fill: url(#mainGradient);
}

.planet-ring {
    fill: none;
    stroke: url(#ringGradient);
    stroke-width: 1.2;
}
/* Mobile Responsive (dưới 768px) */
@media (max-width: 767.98px) {
    /* Cấu trúc lại header */
    .navbar {
        position: relative;
        padding: 15px 0;
    }

    .navbar > .container {
        display: flex;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap;
    }

    /* Nút toggle bên trái */
    .navbar-toggler {
        order: 1;
        z-index: 2;
        margin-right: 10px;
    }

    /* Logo - CĂN GIỮA */
    .navbar-brand {
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        width: auto;
        margin: 0 auto;
        z-index: 1;
    }

    .navbar-brand svg {
        width: 180px;
        height: 40px;
    }

    /* Phần đăng nhập/avatar bên phải */
    nav.d-flex.align-items-center.gap-1 {
        order: 3;
        margin-left: auto;
        z-index: 2;
    }

    /* Menu dropdown */
    .navbar-collapse {
        position: fixed;
        top: 55px;
        left: 0;
        right: 0;
        background: white;
        padding: 15px;
        box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
        z-index: 1000;
    }

    /* Điều chỉnh ngôi sao */
    g[transform="translate(290, 40) scale(1.1)"] {
        transform: translate(150, 30) scale(0.8) !important;
    }

    /* Giải pháp 3: Icon dropdown */
    .d-md-none .account-icon {
        width: 32px;
        height: 32px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        background: rgba(106, 69, 209, 0.1);
    }

    /* Điều chỉnh vị trí dropdown menu trên mobile */
    .astrology-dropdown-menu {
        position: fixed !important;
        top: 55px !important;
        right: 15px !important;
        left: auto !important;
        transform: none !important;
        min-width: 200px;
        z-index: 1030;
    }

    /* Đảm bảo dropdown không bị ẩn phía sau các phần tử khác */
    .astrology-dropdown {
        position: static;
    }
}

/* Màn hình rất nhỏ (dưới 576px) */
@media (max-width: 575.98px) {
    .navbar-brand svg {
        width: 150px;
        height: 35px;
    }

    g[transform="translate(290, 40) scale(1.1)"] {
        transform: translate(130, 25) scale(0.7) !important;
    }

    .account-icon {
        width: 35px;
        height: 35px;
    }

    .btn-login {
        font-size: 0.9rem;
    }
    /* Điều chỉnh cho màn hình rất nhỏ */
    .astrology-dropdown-menu {
        right: 10px !important;
        min-width: 180px;
    }
}
