html {
    height: 100%;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: #181818;
    color: #FFFFFF;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow-x: hidden;
    padding-top: 70px;
}

/* === NAVBAR === */
.navbar {
    position: fixed;
    width: 100%;
    height: 60px;
    top: 0;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 1000;
    box-sizing: border-box;
    background: transparent !important;
    isolation: isolate;
}

.navbar::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(35, 35, 35, 0.55);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    background-clip: padding-box;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    z-index: 0;
    will-change: transform, backdrop-filter;
    transform: translateZ(0);
    transition: none !important;
}

.navbar > * {
    position: relative;
    z-index: 1;
}

/* Navbar Left Section */
.navbar-left {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}

.menu-icon {
    font-size: 24px;
    color: #FFFFFF;
    cursor: pointer;
    transition: color 0.3s ease;
}

.navbar-spacer {
    width: 0;
    flex-shrink: 0;
}

.logo-container {
    display: flex;
    align-items: center;
}

.logo {
    height: 30px;
    width: auto;
    object-fit: contain;
}

/* === SEARCH BAR === */
.navbar-center {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 450px;
    margin: 0 auto;
    position: relative;
    padding-right: 55px;
    padding-left: 10px;
    z-index: 1000;
    width: calc(100% - 260px);
}

.navbar.no-profile .navbar-center {
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
    justify-content: flex-end;
    margin-left: 0;
    padding-right: 0;
    z-index: 1000;
    min-width: 200px;
}

.navbar.no-profile .navbar-search {
    width: 100%;
    max-width: inherit;
}

.navbar-search {
    display: flex;
    align-items: center;
    background: linear-gradient(145deg, #1e1e1e, #161616);
    border-radius: 25px;
    padding: 7px 15px;
    width: 100%;
    max-width: 100%;
    z-index: 1000;
}

.navbar-search:hover,
.navbar-search:focus-within {
    border: 1px solid var(--highlightRgba);
    box-shadow: inset 0 2px 6px var(--highlightRgba),
                0 3px 8px var(--highlightRgba);
    z-index: 1000;
}

.search-input {
    flex-grow: 1;
    border: none;
    background: transparent;
    outline: none;
    color: #fff;
    font-size: 16px;
    padding: 6px;
    width: 100%;
    font-family: 'Poppins', sans-serif;
    letter-spacing: 0.3px;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
    transition: color 0.3s ease;
}

.search-input:focus::placeholder {
    color: rgba(255, 255, 255, 0.3);
}

.navbar-search i {
    color: rgba(255, 255, 255, 0.6);
    font-size: 16px;
    margin-right: 8px;
    transition: color 0.3s ease;
}

.navbar-search:hover i {
    color: var(--highlightRgba);
}

.search-btn {
    background: none;
    border: none;
    color: #32BFFF;
    font-size: 18px;
    cursor: pointer;
    padding: 5px;
    transition: color 0.3s ease;
}

.search-btn:hover {
    color: #1E9FC6;
}

/* === SEARCH DROPDOWN === */
.search-dropdown {
    position: absolute;
    top: calc(100% + 5px);
    left: 0;
    right: 0;
    width: 100%;
    border-radius: 0 0 8px 8px;  /* Only bottom corners rounded */
    overflow: hidden;
    background: transparent !important;
    display: block !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    z-index: 2003 !important;
    isolation: isolate;
}

.search-dropdown.open,
.search-dropdown.active,
.navbar-search:focus-within + .search-dropdown,
.navbar-search:focus-within ~ .search-dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
}

.search-dropdown::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 0 0 8px 8px;  /* Only bottom corners rounded */
    background: rgba(35, 35, 35, 0.55);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    background-clip: padding-box;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-top: 1px solid rgba(255, 255, 255, 0.08);  /* Keep top border */
    z-index: 0;
    will-change: transform, backdrop-filter;
    transform: translateZ(0);
    transition: none !important;
}

.search-dropdown > * {
    position: relative;
    z-index: 1;
}

.search-option {
    padding: 10px 15px;
    cursor: pointer;
    color: #fff;
    font-weight: bold;
    font-size: 16px;
    transition: background 0.2s;
}

.search-option:hover {
    background: var(--highlightRgba);
}

/* === PROFILE PICTURE === */
.profile-pic-container {
    position: absolute;
    right: 20px;
    top: 50%;
    z-index: 500;
    transform: translateY(-50%);
}

/* === MOBILE NAVIGATION DROPDOWN === */
.navbar-links.mobile {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 60px;
    left: 0;
    width: auto;
    padding: 0;
    margin: 0;
    align-items: flex-start;
    gap: 0;
    z-index: 2001 !important;
    border-bottom-right-radius: 12px !important;
    animation: dropdownAnimation 0.3s ease-out;
    font-size: 16px;
    background: transparent !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    isolation: isolate;
}

.navbar-links.mobile.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.navbar-links.mobile::after {
    content: "";
    position: absolute;
    inset: 0;
    left: -1px;
    right: -1px;
    top: 0;
    bottom: -1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(35, 35, 35, 0.55);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    background-clip: padding-box;
    border-top: none;
    border-top-color: transparent;
    z-index: 0;
    will-change: transform, backdrop-filter;
    transform: translateZ(0);
    transition: none !important;
}

.navbar-links.mobile > * {
    position: relative;
    z-index: 1;
}

.navbar-links.mobile a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 16px 24px;
    font-size: inherit;
    font-weight: bold;
    text-align: left;
    color: #FFFFFF;
    width: 100%;
    position: relative;
    text-decoration: none;
}

.navbar-links.mobile a .nav-icon {
    display: inline-block;
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.navbar-links.mobile a:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* === PROFILE DROPDOWN === */
.profile-dropdown {
    display: flex !important;
    flex-direction: column;
    position: absolute;
    top: 60px;
    right: 0px;
    width: auto;
    border-bottom-left-radius: 12px !important;
    animation: dropdownAnimation 0.3s ease-out;
    z-index: 2002 !important;
    text-align: right;
    align-items: flex-start;
    font-size: 16px;
    background: transparent !important;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    isolation: isolate;
}

.profile-dropdown.active {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.profile-dropdown::after {
    content: "";
    position: absolute;
    inset: 0;
    left: -1px;
    right: -1px;
    top: 0;
    bottom: -1px;
    border-radius: inherit;
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(35, 35, 35, 0.55);
    -webkit-backdrop-filter: blur(12px) saturate(140%);
    backdrop-filter: blur(12px) saturate(140%);
    background-clip: padding-box;
    border-top: none;
    border-top-color: transparent;
    z-index: 0;
    will-change: transform, backdrop-filter;
    transform: translateZ(0);
    transition: none !important;
}

.profile-dropdown > * {
    position: relative;
    z-index: 1;
}

.profile-dropdown a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    width: 100%;
    text-decoration: none;
    color: #FFFFFF;
    font-size: inherit;
    font-weight: bold;
    text-align: left;
    position: relative;
    gap: 12px;
}

.profile-dropdown a .link-text {
    justify-content: space-between;
    flex-grow: 1;
    text-align: left;
    gap: 12px;
}

.profile-dropdown a .nav-icon {
    width: 24px;
    height: 24px;
    object-fit: contain;
    flex-shrink: 0;
}

.profile-dropdown::before {
    content: "";
    position: absolute;
    top: -10px;
    left: 0;
    width: 100%;
    height: 10px;
    background: transparent !important;
    box-shadow: none;
    border-top: none !important;
    z-index: 3;
}

.profile-dropdown a:not(:last-child)::after {
    content: "";
    position: absolute;
    bottom: 0;
    right: 10%;
    width: 80%;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

/* === ANIMATIONS === */
@keyframes dropdownAnimation {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === CONTAINER === */
.container {
    margin: 100px auto 0;
    padding: 20px;
    background-color: #232323;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    max-width: 100%;
    width: 100%;
    flex: 1;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    overflow: visible;
}

.shadow-wrapper {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    border-radius: 12px;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    background-color: #232323;
}

/* === CSS VARIABLES === */
:root {
    --glass-bg: rgba(35, 35, 35, 0.55);
    --glass-blur: 12px;
    --glass-sat: 140%;
    --glass-hairline: rgba(255, 255, 255, 0.08);
}

/* === RESPONSIVE BREAKPOINTS === */

/* 2560px Screens */
@media (max-width: 2560px) {
    .navbar {
        padding: 10px;
    }
    .navbar-left {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .navbar-center {
        width: calc(100% - 970px);
        max-width: 970px;
    }
    .navbar.no-profile .navbar-center {
        width: calc(100% - 970px);
        max-width: 970px;
    }
    .navbar-search {
        width: 100%;
    }
    .profile-pic-container {
        right: 10px;
    }
    .profile-pic {
        width: 40px;
        height: 40px;
    }
}

/* 1920px Screens */
@media (max-width: 1920px) {
    .navbar {
        padding: 10px;
    }
    .navbar-left {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .navbar-center {
        width: calc(100% - 798px);
        max-width: 798px;
    }
    .navbar.no-profile .navbar-center {
        width: calc(100% - 728px);
        max-width: 728px;
    }
    .navbar-search {
        width: 100%;
    }
    .profile-pic-container {
        right: 10px;
    }
    .profile-pic {
        width: 40px;
        height: 40px;
    }
}

/* 1440px Screens */
@media (max-width: 1440px) {
    .navbar {
        padding: 10px;
    }
    .navbar-left {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .navbar-center {
        width: calc(100% - 600px);
        max-width: 600px;
    }
    .navbar.no-profile .navbar-center {
        width: calc(100% - 600px);
        max-width: 600px;
    }
    .navbar-search {
        width: 100%;
    }
    .profile-pic-container {
        right: 10px;
    }
    .profile-pic {
        width: 40px;
        height: 40px;
    }
}

/* 1280px Screens */
@media (max-width: 1280px) {
    .navbar {
        padding: 10px;
    }
    .navbar-left {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .navbar-center {
        width: calc(100% - 532px);
        max-width: 532px;
    }
    .navbar.no-profile .navbar-center {
        width: calc(100% - 532px);
        max-width: 532px;
    }
    .navbar-search {
        width: 100%;
    }
    .profile-pic-container {
        right: 10px;
    }
    .profile-pic {
        width: 40px;
        height: 40px;
    }
}

/* 1024px Screens */
@media (max-width: 1024px) {
    .navbar {
        padding: 10px;
    }
    .navbar-left {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .navbar-center {
        width: calc(100% - 425px);
        max-width: 425px;
    }
    .navbar.no-profile .navbar-center {
        width: calc(100% - 420px);
        max-width: 420px;
    }
    .navbar-search {
        width: 100%;
    }
    .profile-pic-container {
        right: 10px;
    }
    .profile-pic {
        width: 40px;
        height: 40px;
    }
}

/* 768px - Tablets */
@media (max-width: 768px) {
    .menu-icon {
        display: block;
    }
    .navbar-links {
        display: none;
    }
    .navbar-links.mobile {
        display: flex;
    }
    .navbar {
        padding: 10px;
    }
    .navbar-left {
        display: flex;
        align-items: center;
        gap: 10px;
    }
    .navbar-center {
        width: calc(100% - 320px);
        max-width: 320px;
    }
    .navbar.no-profile .navbar-center {
        width: calc(100% - 320px);
        max-width: 320px;
    }
    .navbar-search {
        width: 100%;
    }
    .profile-pic-container {
        right: 10px;
    }
    .profile-pic {
        width: 40px;
        height: 40px;
    }
    .container {
        margin: 80px auto;
        padding: 10px;
    }
    #3d-container {
        max-height: 400px;
        min-height: 200px;
    }
}

/* 480px - Mobile */
@media (max-width: 480px) {
    .navbar-center {
        width: calc(100% - 280px);
        max-width: 200px;
    }
    .navbar.no-profile .navbar-center {
        width: calc(100% - 200px);
        max-width: 200px;
    }
    .navbar-spacer {
        width: 0;
    }
}

/* === DROPDOWN SCALING FOR LARGER SCREENS === */

/* 1440px+ - Scale up dropdowns */
@media (min-width: 1440px) {
    .navbar-links.mobile {
        font-size: 18px !important;
    }
    .navbar-links.mobile a {
        padding: 18px 28px !important;
        gap: 14px !important;
    }
    .navbar-links.mobile a .nav-icon {
        width: 28px !important;
        height: 28px !important;
    }
    .profile-dropdown {
        font-size: 18px !important;
    }
    .profile-dropdown a {
        padding: 18px 28px !important;
        gap: 14px !important;
    }
    .profile-dropdown a .nav-icon {
        width: 28px !important;
        height: 28px !important;
    }
    .search-option {
        padding: 12px 18px !important;
        font-size: 18px !important;
    }
}

/* 1920px+ - Scale up more */
@media (min-width: 1920px) {
    .navbar-links.mobile {
        font-size: 20px !important;
    }
    .navbar-links.mobile a {
        padding: 20px 32px !important;
        gap: 16px !important;
    }
    .navbar-links.mobile a .nav-icon {
        width: 32px !important;
        height: 32px !important;
    }
    .profile-dropdown {
        font-size: 20px !important;
    }
    .profile-dropdown a {
        padding: 20px 32px !important;
        gap: 16px !important;
    }
    .profile-dropdown a .nav-icon {
        width: 32px !important;
        height: 32px !important;
    }
    .search-option {
        padding: 14px 20px !important;
        font-size: 20px !important;
    }
}

/* 2560px+ - Scale up even more */
@media (min-width: 2560px) {
    .navbar-links.mobile {
        font-size: 22px !important;
    }
    .navbar-links.mobile a {
        padding: 24px 36px !important;
        gap: 18px !important;
    }
    .navbar-links.mobile a .nav-icon {
        width: 36px !important;
        height: 36px !important;
    }
    .profile-dropdown {
        font-size: 22px !important;
    }
    .profile-dropdown a {
        padding: 24px 36px !important;
        gap: 18px !important;
    }
    .profile-dropdown a .nav-icon {
        width: 36px !important;
        height: 36px !important;
    }
    .search-option {
        padding: 16px 24px !important;
        font-size: 22px !important;
    }
}