:root {
    --bg-dark: #0A1930;
    --text-dark: #E6E6FA;
    --accent-dark: #00FFFF;
    --bg-light: #FFFFFF;
    --text-light: #0A1930;
    --accent-light: #008080;
}

::selection {
    background-color: var(--accent-dark);
    color: var(--bg-dark);
}

.light-mode ::selection {
    background-color: var(--accent-light);
    color: var(--bg-light);
}

::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-thumb {
    background-color: var(--accent-dark);
    border-radius: 10px;
}

.light-mode::-webkit-scrollbar-thumb {
    background-color: var(--accent-light);
}

::-webkit-scrollbar-track {
    background-color: var(--bg-dark);
}

.light-mode::-webkit-scrollbar-track {
    background-color: var(--bg-light);
}


* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Roboto', sans-serif;
    transition: background-color 0.3s, color 0.3s;
}

/* Top Button Styling.  */
#top {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background-color: var(--accent-dark);
    color: var(--bg-dark);
    border: none;
    border-radius: 50%;
    width: 42px;
    height: 42px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: background-color 0.3s, transform 0.3s;
}

.light-mode #top {
    background-color: var(--accent-light);
    color: var(--bg-light);
}

#top i {
    font-size: 2.3rem;
}

#top:hover {
    transform: translateY(-2px);
}

.light-mode #top:hover {
    transform: translateY(-2px);
}


body.dark-mode {
    background-color: var(--bg-dark);
    color: var(--text-dark);
}

body.light-mode {
    background-color: var(--bg-light);
    color: var(--text-light);
}

#background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
}

header {
    padding: 1rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    background-color: var(--bg-dark);
    margin-bottom: 1rem;
}

.light-mode header {
    background-color: var(--bg-light);
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Montserrat', sans-serif;
    font-size: 2rem;
    font-weight: 700;
    background: linear-gradient(45deg, var(--accent-dark), var(--text-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
}

.light-mode .logo {
    background: linear-gradient(45deg, var(--accent-light), var(--text-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.logo:hover {
    transform: scale(1.03);
}

.nav-links {
    display: flex;
    list-style: none;
}

.nav-item {
    margin: 0 1rem;
    text-decoration: none;
    color: inherit;
    font-weight: 500;
    transition: color 0.3s;
    position: relative;
}

.nav-item.active::after {
    content: "";
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 100%;
    height: 2px;
    background-color: var(--accent-dark);
    transition: width 0.3s;
}

.light-mode .nav-item.active::after {
    background-color: var(--accent-light);
}

.light-mode .nav-item::after {
    background-color: var(--accent-light);
}

.nav-item:hover {
    color: var(--accent-dark);
}

.light-mode .nav-item:hover {
    color: var(--accent-light);
}

.nav-item:hover::after {
    width: 100%;
    left: 0;
}

.nav-buttons a {
    text-decoration: none;
    color: inherit;
}

.mobile-nav-buttons a {
    text-decoration: none;
    color: inherit;
}

.nav-buttons button {
    margin-left: 1rem;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.login-btn {
    background-color: transparent;
    color: inherit;
    border: 1px solid var(--text-dark) !important;
}

.light-mode .login-btn {
    border: 1px solid var(--text-light) !important;
}

.signup-btn {
    background-color: var(--accent-dark);
    color: var(--bg-dark);
}

.light-mode .signup-btn {
    background-color: var(--accent-light);
    color: var(--bg-light);
}

.login-btn:hover,
.signup-btn:hover {
    transform: translate(0, -2px);
}

#theme-toggle {
    background: none;
    border: none;
    color: inherit;
    font-size: 1rem;
}

#theme-toggle:hover {
    transform: scale(1.1);
}

/* Styling for the Hamburger Menu.  */
.hamburger {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1002;
    position: relative;
}

.hamburger span {
    display: block;
    width: 30px;
    height: 3px;
    margin: 6px 0;
    background-color: var(--text-dark);
    transition: all 0.3s ease-in-out;
}

.light-mode .hamburger span {
    background-color: var(--text-light);
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 80%;
    max-width: 400px;
    height: 100vh;
    background-color: var(--bg-dark);
    transition: right 0.3s ease-in-out;
    z-index: 1001;
    padding: 2rem;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.light-mode .mobile-nav {
    background-color: var(--bg-light);
}

.mobile-nav.active {
    right: 0;
}

.mobile-nav-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--accent-dark);
}

.light-mode .mobile-nav-header {
    border-bottom-color: var(--accent-light);
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-dark);
    font-size: 1.8rem;
    cursor: pointer;
    transition: transform 0.3s ease;
}

.light-mode .close-btn {
    color: var(--text-light);
}

.close-btn:hover {
    transform: rotate(90deg);
}

.mobile-nav-links {
    list-style: none;
    margin-bottom: 2rem;
}

.mobile-nav-links li {
    margin-bottom: 1.5rem;
}

.mobile-nav-links .nav-item {
    font-size: 1.3rem;
    transition: color 0.3s ease, transform 0.3s ease;
    display: inline-block;
}

.mobile-nav-links .nav-item:hover {
    color: var(--accent-dark);
    transform: translateX(10px);
}

.light-mode .mobile-nav-links .nav-item:hover {
    color: var(--accent-light);
}

.mobile-nav-buttons {
    margin-top: auto;
}

.mobile-nav-buttons button {
    display: block;
    width: 100%;
    margin-bottom: 1rem;
    padding: 0.8rem;
    border-radius: 5px;
    cursor: pointer;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.mobile-nav-buttons button:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

#mobile-theme-toggle {
    background: none;
    border: 2px solid var(--text-dark);
    color: var(--text-dark);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    margin: 1rem auto;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-bottom: 3rem;
}

.light-mode #mobile-theme-toggle {
    border-color: var(--text-light);
    color: var(--text-light);
}

#mobile-theme-toggle:hover {
    background-color: var(--text-dark);
    color: var(--bg-dark);
}

.light-mode #mobile-theme-toggle:hover {
    background-color: var(--text-light);
    color: var(--bg-light);
}

/* Styling for Hero Section. */
.hero {
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 2rem;
    position: relative;
    z-index: 1;
}

/* Adjust 3D background positioning */
#background {
    opacity: 0.3;
}

.light-mode #background {
    opacity: 0.7;
}

.hero-title {
    font-family: 'Montserrat', sans-serif;
    font-size: 3.5rem;
    margin-bottom: 1rem;
    animation: fadeInUp 1s ease-out;
}

.hero-title span {
    background: linear-gradient(45deg, var(--accent-dark), var(--text-dark));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-title span::selection {
    background: var(--accent-dark);
    color: var(--bg-dark);
    -webkit-text-fill-color: var(--bg-dark);
}

.light-mode .hero-title span {
    background: linear-gradient(45deg, var(--accent-light), var(--text-light));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.light-mode .hero-title span::selection {
    background: var(--accent-light);
    color: var(--bg-light);
    -webkit-text-fill-color: var(--bg-light);
}

.hero-subtitle {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    animation: fadeInUp 1s ease-out 0.5s both;
}

.light-mode .hero-title,
.light-mode .hero-subtitle {
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.1);
}

.search-container {
    display: flex;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 600px;
    animation: fadeInUp 1s ease-out 1s both;
}

.search-input {
    flex-grow: 1;
    padding: 1rem;
    border: none;
    border-radius: 50px 0 0 50px;
    font-size: 1rem;
    background-color: rgba(255, 255, 255, 0.1);
    color: inherit;
}

.search-input:focus {
    outline: none;
}

.search-btn {
    padding: 1rem 1.5rem;
    border: none;
    border-radius: 0 50px 50px 0;
    background-color: var(--accent-dark);
    color: var(--bg-dark);
    cursor: pointer;
    transition: all 0.3s;
}

.light-mode .search-input {
    background-color: rgba(0, 0, 0, 0.05);
}

.light-mode .popular-searches a {
    background-color: rgba(0, 0, 0, 0.05);
}

.light-mode .search-btn {
    background-color: var(--accent-light);
    color: var(--bg-light);
}

.popular-searches {
    animation: fadeInUp 1s ease-out 1.5s both;
}

.popular-searches h3 {
    margin-bottom: 1rem;
    letter-spacing: 1px;
}

.popular-searches ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    list-style: none;
}

.popular-searches li {
    margin: 0.5rem;
    margin-bottom: 1rem;
}

.popular-searches a {
    text-decoration: none;
    color: inherit;
    background-color: rgba(255, 255, 255, 0.1);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    transition: all 0.3s;
}

.popular-searches a:hover {
    background-color: var(--accent-dark);
    color: var(--bg-dark);
}

.light-mode .popular-searches a:hover {
    background-color: var(--accent-light);
    color: var(--bg-light);
}

/* Background shapes */
.shape {
    position: fixed;
    opacity: 0.4;
    pointer-events: none;
    z-index: -1;
}

.light-mode .shape {
    opacity: 0.4;
    filter: invert(1);
}

/* Scroll Prompt */
.scroll-prompt {
    position: absolute;
    bottom: 2rem;
    left: 45;
    right: 45;
    transform: translateX(-50%);
    text-align: center;
    cursor: pointer;
    animation: fadeInUp 1s ease-out 2s both;
}

.light-mode .scroll-prompt p {
    color: var(--text-light);
}

.scroll-arrow {
    font-size: 2rem;
    color: var(--accent-dark);
    animation: bounce 2s infinite;
}

.light-mode .scroll-arrow {
    color: var(--accent-light);
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}


@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}


/* Responsive Styling */
@media screen and (max-width: 1024px) {
    .hero-title {
        font-size: 3rem;
    }

    .hero-subtitle {
        font-size: 1.1rem;
    }
}

@media screen and (max-width: 768px) {

    .nav-links,
    .nav-buttons {
        display: none;
    }

    .hamburger {
        display: block;
    }

    nav {
        justify-content: space-between;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-subtitle {
        font-size: 1rem;
    }

    .search-container {
        max-width: 90%;
    }

    .scroll-prompt {
        bottom: 4rem;
    }
}

@media screen and (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 0.9rem;
    }

    .search-container {
        max-width: 100%;
    }
}