:root {
    --primary-color: #1a73e8;
    --secondary-color: #1557b0;
    --background-color: #f2f2f2;
    --text-color: #545454;
    --white: #ffffff;
    --input-border-radius: 40px;
    --nav-height: 64px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 100vh;
    background-color: #ffffff;

    line-height: 1.6;
    transition: background-color 0.3s ease;
    padding-top: var(--nav-height);
}

/* Navigation Bar Styles */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    /* # background-color: #f5f5f7; */
    background: rgba(245, 245, 247, 0.5);
    backdrop-filter: blur(5px);


    height: var(--nav-height);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

/* .privacy {

    display: flex;
    justify-content: flex-end;
    margin: 0;


} */


/* Hamburger Menu Styles */
.nav-menu-icon {
    cursor: pointer;
    /* padding: 5px; */

    border-radius: 80%;
    margin-left: 80%;
    margin-top: 0%;

    transition: background-color 0.2s;
}

.nav-menu-icon:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Apps Popup Styles */
.apps-popup {
    position: absolute;
    top: calc(var(--nav-height) + 8px);
    right: 24px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 16px;
    display: none;
    z-index: 1001;
    width: 320px;
}

.apps-popup.show {
    display: block;
    animation: fadeIn 0.2s ease-in-out;
}

.apps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.app-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    padding: 12px;
    border-radius: 8px;
    transition: background-color 0.2s;
}

.app-item:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

.app-icon {
    width: 40px;
    height: 40px;
    margin-bottom: 8px;
}

.app-name {
    color: #5f6368;
    font-size: 12px;
    text-align: center;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

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

/* Overlay for clicking outside */
.popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: transparent;
    display: none;
    z-index: 1000;
}

.popup-overlay.show {
    display: block;
}

.top-nav.nav-search-active {
    transform: translateY(0);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 20px;
    flex: 1;
}

.nav-logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    height: 100%;
}

.nav-logo-link:hover {
    opacity: 0.9;
}


.nav-logo-container {
    height: 45px;
    /* width; */
    display: flex;
    align-items: center;
}

.nav-logo-container img {
    height: 100%;
    max-width: 160px;
    object-fit: contain;
}

.nav-search-container {
    flex: 1;
    max-width: 815px;
    padding-left: 8px;
    margin-right: 20px;
}

/* .nav-right {
    display: flex;
    gap: 20px;
    align-items: center;
} */

.nav-link {
    color: var(--text-color);
    text-decoration: none;
    font-size: 14px;
    padding: 8px 12px;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.nav-link:hover {
    background-color: rgba(0, 0, 0, 0.05);
}

/* Loading Spinner */
/* .loading-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: none;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid #ff2600;
    border-radius: 50%;
    animation: spin 1s linear infinite;
} */


/* Update and add to your loading container styles */


.loading-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    display: none;
}

.card {
    --bg-color: #ffffff;
    /* background-color: var(--bg-color); */
    padding: 1rem 2rem;
    border-radius: 1.25rem;
}

.loader {
    color: rgb(124, 124, 124);
    font-family: "Poppins", sans-serif;
    font-weight: 500;
    font-size: 25px;
    box-sizing: content-box;
    padding: 10px 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.loading-circle {
    width: 50px;
    height: 50px;
    border: 5px solid rgba(0, 0, 0, 0.1);
    border-top: 5px solid #ff2600d5;
    border-radius: 50%;
    animation: spin-circle 1s linear infinite;
}

@keyframes spin-circle {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

.words {
    overflow: hidden;
    position: relative;
    height: 31px;
    /* Ensure this matches the height of the .word elements */
}

.words::after {
    content: "";
    position: absolute;
    inset: 0;
    /* background: linear-gradient(var(--bg-color) 10%,
            transparent 30%,
            transparent 70%,
            var(--bg-color) 90%); */
    z-index: 20;
}

.word {
    display: block;
    height: 100%;
    padding-left: 6px;
    color: #ff2600d5;
    /* text-shadow: 0px 1px 3px rgba(255, 255, 255, 0.8); */
    /* Added white shadow effect */
    animation: spin-words 12s infinite;
    /* Adjust this value to change scrolling speed */
}

@keyframes spin-words {

    0%,
    33% {
        transform: translateY(0);
    }

    36%,
    66% {
        transform: translateY(-100%);
    }

    69%,
    100% {
        transform: translateY(-200%);
    }
}




/* @keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
} */

/* Load More Button */
.load-more-container {
    width: 100%;
    display: flex;
    justify-content: center;
    margin: 20px 0;
}

.load-more-button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s ease;
}

.load-more-button:hover {
    background-color: var(--secondary-color);
}

.load-more-button:disabled {
    background-color: #ccc;
    cursor: not-allowed;
}

.load-more-loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid var(--white);
    border-top: 3px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-left: 10px;
    vertical-align: middle;
}

/* Logo and SVG Container */
.svg-container {
    position: fixed;
    top: 25%;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    justify-content: center;
    width: 100%;
    height: 90px;
    transition: all 0.3s ease;
    z-index: 10;
}

.svg-container.search-active {
    opacity: 0;
    pointer-events: none;
}

.svg-container .logo {
    max-height: 100px;
    transition: max-height 0.3s ease;
}

/* Input Container */
.InputContainer {
    position: fixed;
    top: calc(32% + 60px);
    left: 50%;
    transform: translateX(-50%);
    height: 60px;
    width: 760px;
    display: flex;
    align-items: center;
    background-color: var(--white);
    border-radius: var(--input-border-radius);
    overflow: hidden;
    cursor: pointer;
    padding-left: 15px;
    box-shadow: 7px 8px 25px rgba(119, 119, 119, 0.29);
    transition: all 0.3s ease;
    z-index: 20;
}

.InputContainer.search-active {
    position: relative;
    top: 0;
    height: 45px;
    /* width: 100px; */
    left: 0;
    transform: none;
    width: 100%;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
}

.startIcon {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
}

.startIcon .searchIcon {
    width: 20px;
    height: 20px;
    fill: var(--gray);
}

.input {
    width: calc(100% - 45px);
    height: 100%;
    border: none;
    outline: none;
    font-size: 1em;
    caret-color: rgb(255, 81, 0);
}

/* Results Container */
.results-container {
    width: 80%;
    max-width: 800px;
    margin-top: calc(var(--nav-height) + 5px);
    background-color: transparent;
    display: none;
    /* padding-top: 5px; */
}

.result-item {
    background-color: var(--white);
    margin-bottom: 10px;
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: background-color 0.3s ease;
}

.result-item:hover {
    background-color: #f5f5f5;
}

.result-title {
    font-size: 18px;
    color: #2b2b2b;
    margin-bottom: 5px;
    text-decoration: none;
    font-weight: bold;
    display: block;
}

.result-url {
    color: #006621;
    font-size: 14px;
    margin-bottom: 5px;
    word-break: break-all;
}

.result-description {
    color: var(--text-color);
    font-size: 14px;
}

/* Search Privacy Container */
.search-privacy-container {
    width: 100%;
    padding: 20px;
    display: flex;
    font-family: 'Andika New Basic', sans-serif;
    flex-direction: column;
    align-items: center;
    color: var(--text-color);
    margin-top: auto;
    position: relative;
    bottom: 0;
    opacity: 1;
    transition: all 0.3s ease;
}

.search-privacy-container.search-active {
    opacity: 0;
    pointer-events: none;
}

/* Footer */
footer {
    width: 100%;
    background-color: #f5f5f7;
    color: #545454;
    /* Updated text color */
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    font-size: 14px;
    border-top: 1px solid #ccc;
    margin-top: auto;
}

footer a {
    text-decoration: none;
    /* Remove underline */
    color: #545454;
    /* Ensure links match the new text color */
}

footer a:hover {
    text-decoration: none;
    /* Prevent underline on hover */

}

footer a.privacy-policy {
    margin-right: 0px;
}




/* Error Message */
.error-message {
    display: none;
    color: #ff0000;
    text-align: center;
    margin: 20px 0;
    font-size: 16px;
}

/* Responsive Design */
@media screen and (max-width: 1200px) {
    .nav-content {
        padding: 0 15px;
    }

    .nav-search-container {
        max-width: 500px;
    }

}

@media screen and (max-width: 992px) {
    .nav-search-container {
        max-width: 400px;
    }

    .InputContainer {
        width: 95%;
        height: 50px;

    }
}

@media screen and (max-width: 768px) {
    .nav-content {
        padding: 0 10px;
    }

    .svg-container .logo {
        max-height: 360px;
        /* Reduce height for mobile */
        max-width: 360px;
        /* Ensure proportional width */
    }

    .svg-container .logo {
        max-height: 360%;
        /* Reduce height for mobile */
        max-width: 360px;
        /* Ensure proportional width */
    }

    .svg-container {
        width: 50px;
    }

    .nav-left {
        gap: 10px;
    }

    .nav-search-container {
        max-width: none;
        margin-right: 10px;
    }

    .nav-right {
        display: none;
        /* Hide nav links on mobile */
    }

    .InputContainer {
        width: 95%;
        height: 50px;

    }

    .results-container {
        width: 95%;
        /* padding: 10px; */
        padding: 1px;

    }
}

@media screen and (max-width: 480px) {
    :root {
        --nav-height: 56px;
    }

    .nav-logo-container img {
        max-width: 80px;
    }

    .svg-container .logo {
        max-height: 360px;
        /* Reduce height for mobile */
        max-width: 360px;
        /* Ensure proportional width */
    }

    .InputContainer {
        height: 36px;
        height: 50px;

    }

    .result-title {
        font-size: 16px;
    }

    .result-description {
        font-size: 13px;
    }

    footer {
        flex-direction: column;
        gap: 10px;
        text-decoration: none;
        color: var(--text-color);
        text-align: center;
        padding: 15px 10px;
    }

    footer span {
        justify-content: center;
    }

    footer .privacy {
        margin-right: 10px;
    }
}


@media screen and (max-width: 360px) {
    :root {
        --nav-height: 56px;
    }

    .nav-logo-container img {
        max-width: 80px;
    }

    .svg-container .logo {
        max-height: 360px;
        /* Reduce height for mobile */
        max-width: 360px;
        /* Ensure proportional width */
    }

    .InputContainer {
        height: 36px;
        height: 50px;

    }

    .result-title {
        font-size: 16px;
    }

    .result-description {
        font-size: 13px;
    }

    footer {
        flex-direction: column;
        gap: 10px;
        text-decoration: none;
        color: var(--text-color);
        text-align: center;
        padding: 15px 10px;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    * {
        animation: none !important;
        transition: none !important;
    }
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.visible {
    display: block !important;
}
