body {
    margin: 0;
    font-family: 'Arial', sans-serif;
    margin-top: 64px;
}
/* top bar */
.topbar {
    position: fixed;
    display: flex;
    justify-content: space-between;
    align-items: center;
    top: 0;
    width: 100%;
    background-color: #ffffff;
    z-index: 1000;
    box-shadow: 0 2px 5px rgb(0, 0, 0, 0.1);
    padding: 10px 20px;
}
.left-nav, .right-nav {
    display: flex;
    align-items: center;
}
.main-nav {
    display:flex;
    max-height: 48px;
    width: auto;
    align-items: center;
}
.home {
    display: inline-block;
}
.home img {
    max-height: 32px;
    width: auto;
    padding-left: 1em;
    padding-right: 3em;
}

.dropdown {
    display: flex;
    position: relative;
}
.dropdown-text {
    position: absolute;
    top: 3.25em;
    left: 0;
    background-color: white;
    box-shadow: 0 -3px 20px rgba(0, 0, 0, 0.1), 0 3px 20px rgba(0, 0, 0, 0.1); /* 添加上下陰影 */
    z-index: 1;
    padding: 1em;
    height: 45vh;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.5s ease-in-out, transform 0.5s ease-in-out, visibility 0.5s;
}
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}
@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}
.product-dropdown {
    width: 100vw; 
    margin-left: -19.2vw; 
    left: 50%; 
}
.community-dropdown {
    width: 30vw;
}
.dropdown:hover .dropdown-text {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}
.dropdown:not(:hover) .dropdown-text {
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
}

.nav-item {
    display: block;
    padding-top: 0.65em;
    padding-bottom: 0.65em;
    margin-left: 2em;
    text-decoration: none;
    color: rgb(85, 83, 83);
    position: relative;
}
.nav-item.has-dropdown::after {
    content: '▾'; 
    margin-left: 0.2em;
}
.dropdown:hover .nav-item.has-dropdown::after {
    content: '▴';
}

.external-link::after {
    content: " →"; /* if external-link then make a mark */
}

.search, .language-selector, .dot-menu, .account {
    display:flex;
    align-items: center;
    margin-right: 1em;
}

.search img, .language-selector img, .dot-menu img, .account img {
    width: 2em;
    height: 2em;
}

.nav-item.more, .more-dropdown {
    display: none;
}

/* search bar */
.search {
    display: flex;
    border: 1px none #ccc;
    background-color: #f1f1f1;
    border-radius: 6px;
    margin: 0.3em;
}
.search input {
    border: none;
    outline: none; /* remove outer border line when clicked */
    background-color: #f1f1f1;
    font-size: 1em;
    height: 2em;
    border-radius: 6px;
}
.search img {
    width: 1.5em;
    height: auto;
}

/* language selector */
.language-selector {
    display: flex;
    border: 1px solid #ccc;
    background-color: #fff;
    border-radius: 6px;
    margin: 0.3em;

}
.language-selector select {
    border: none;
    outline: none;
    background-color: #fff;
    font-size: 1em;
    height: 2em;
    border-radius: 6px;
}
.language-selector img {
    width: 1.5em;
    height: auto;
    padding-right: 0.5em;
    padding-left: 0.5em;
}

/* dot menu */
.dot-menu img {
    margin-left: 0.5em;
    width: 1.5em;
    height: auto;
    border: 1px solid #ccc;
    border-radius: 50%;
}

/* account */
.account img {
    width: 2em;
    height: 2em;
    border: 1px solid #ccc;
    border-radius: 50%;
}

/* ------------------- */
/* ads */
.ads {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1em;
    background-color: rgb(21, 101, 222);
    color: white;
    font-weight: bold;
    font-size: 1em;
}
.ads-link {
    padding-left: 0.5em;
    /* Only when the mouse is over the link, underline dismiss */
    color: darkblue;
}
.ads-link:hover {
    text-decoration: none;
}

/* ------------------- */
/* rewind */
.rewind {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    background-color: #eeeeee;
    font-size: 1.5em;
    height: 89vh;
}
.rewind img {
    padding-right: 8em;
}
.rewind-describe {
    display: flex;
    flex-direction: column;
    font-size: 1.4em;
    max-width: 40%;
    padding-left: 2em;
}
.rewind-content {
    font-size: 0.6em;
}
.rewind-button {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #0578e4;
    border: 0 solid;
    border-radius: 5em;
    width: 10em;
    height: 2em;
    font-size: 0.7em;
    color: white;
    cursor: pointer;

}
.rewind-url {
    text-decoration: none;
}
.rewind-button:hover {
    background-color: gray;
    
}

/* ------------------- */
/* Recommend */
.recommend {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #f0f3f5;
    font-size: 1em;
    height: 50vh;
    padding-left: 200px;
    padding-right: 200px;
}

/* account & filter explain */
.recommend-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}
.filter-group {
    display: flex;
    align-items: center;
}
.account-group {
    display: flex;
    align-items: center;
    margin-right: 30px;
    padding: 5px;
    font-size: 0.9em;
    cursor: pointer;
}
.account-group:hover {
    background-color: #dbeefb;
}
.create-account {
    display: flex;
    align-items: center;
    cursor: pointer;
    color:blue;
}
.create-account-img {
    max-width:24px;
    margin-right: 5px;
}

/* recommend filter */
.recommend-mid {
    margin-top: 10px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
.recommend-filter {
    padding: 8px 10px;
    background-color: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    margin-right: 10px;
    cursor: pointer;
    max-width: 1450px;
}

/* recommend items */
.recommend-bottom {
    margin-top: 10px;
    display: flex;
    overflow-x: auto;
    max-width: 1450px;
}
.recommend-item {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;
    background-color: #fff;
    width: 1000px;
    height: 200px;
    border-radius: 10px;
    margin-right: 30px;
    padding: 16px;
    border-right: 10px;
    border: 1px solid #ddd;
    overflow: hidden;
    text-overflow: ellipsis;
}
.recommend-item h5 {
    margin-top: -5px;
    color: rgb(82, 82, 82);
}
.recommend-item h3 {
    margin: 0 0 10px 0;
    color: rgb(0, 81, 255);
    cursor: pointer;
}
.recommend-item p {
    width: 300px;
    height: 150px;
}
.recommend-item span {
    background-color: rgb(243, 241, 241);
    padding: 3px;
}

/* ------------------- */
/* start building */
.start-building {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: #fff;
    font-size: 1em;
}
.building-title {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    font-size: 1.5em;
}
.building-tools {
    display: flex;
    flex-wrap: wrap;
    padding: 10px;
    justify-content: center;
    align-items: center;
    padding-left: 170px;
    padding-right: 170px;
    gap: 20px;
}
.building-item {
    display: flex;
    flex-direction: column;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 20px;
    width: 280px;
    height: 280px;
    border: 1px solid #ddd;
    border-radius: 20px;
    padding-left: 30px;
    padding-right: 30px;
}
.building-item:hover {
    text-decoration: underline;
    text-decoration-color: blue;
    cursor: pointer;
}

.building-item img {
    width: 50px;
}

.view-tools {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    border-radius: 5px;
    border: 1px solid #ddd;
    background-color: rgb(0, 123, 255);
    padding: 5px 15px;
    font-size: 1.1em;
    color: white;
}
.view-tools:hover {
    background-color: rgb(0, 68, 255);
    cursor: pointer;
}
.all-building-link {
    text-decoration: none;
}

/* ------------------- */
/* Development focus */
.development-focus {
    display: flex;
    flex-direction: column;
    padding-top: 50px;
    align-items: center;
    font-size: 1em;
    height: 70vh;
}
.development-focus h1 {
    font-size: 3em;
}
.focus-title {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    font-size: 1em;
}
.focus-title-sub {
    display: flex;
    font-size: 1.5em;
}
.focus-items {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
}
.focus-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 700px;
    height: 170px;
    margin: 15px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 10px;
}
.focus-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex-grow: 1;
}
.focus-item h3{
    font-size: 1.5em;
    margin-left: 10px;
    margin-top: 0px;
}
.focus-item p {
    margin-left: 10px;
    margin-bottom: 20px;
}
.focus-item span {
    padding: 10px;
    width: 80px;
    border-radius: 5px;
    margin-left: 10px;
    background-color: rgb(0, 123, 255);
    color: white;
}
.focus-item img {
    height: 110px;
    width: auto;
}
.focus-item img:hover, .focus-item span:hover, .focus-item h3:hover {
    cursor: pointer;
}
.focus-item span:hover {
    background-color: rgb(0, 68, 255);
}

/* ------------------- */
/* Trending news */
.trending-news {
    display: flex;
    flex-direction: column;
    padding-top: 50px;
    background-color: #fff;
    font-size: 1em;
    height: 70vh;
}
.trending-news-title {
    display:flex;
    padding-left: 200px;
}
.trending-news-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: center;
    gap: 50px;
}
.trending-news-item {
    display: flex;
    flex-direction: column;
    background-color: #f0f3f5;
    width: 450px;
    border: 1px solid rgb(217, 217, 217);
    border-radius: 10px;
}
.trending-news-item img {
    width: 450px;
    height: auto;
    border-top-left-radius: 10px;
    border-top-right-radius: 10px;
}
.trending-news-item h3, .trending-news-item p {
    padding: 10px;
    margin: 0;
}
.trending-news-item h3 {
    color: rgb(0, 136, 255);
    font-size: 1.2em;
    height: 20px;
}
.trending-news-item p {
    height: 80px;
    padding-top: 30px;
}
.trending-news-text {
    display: flex;
    flex-direction: column;
    padding: 10px;
    min-height: 180px; 
}
.trending-news-text span {
    border: 1px solid rgb(0, 136, 255);
    background-color: rgb(0, 136, 255);
    color: white;
    border-radius: 5px;
    margin-left: 10px;
    margin-right: 310px;
    padding: 10px;
}
.trending-news-item img, .trending-news-text span, .trending-news-item h3 {
    cursor: pointer;
}
.trending-news-item span:hover {
    background-color: rgb(0, 68, 255);
}

/* ------------------- */
/* Footer */
footer {
    background: #f8f9fa;
    font-family: Arial, sans-serif;
}

.footer-bottom {
    background: #f1f3f4;
    margin-top: 40px;
    padding: 20px;
}
.footer-bottom-top {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin: 0 10px;
    padding: 10px 0;
}
.footer-bottom-top img {
    padding-right: 30px;
}
.footer-bottom-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 0 auto;
    padding: 10px 0;
}

.footer-logo img{
    width: 200px;
}

.footer-links a {
    margin-right: 15px;
    text-decoration: none;
    color: #5f6368;
    font-size: 14px;
}

.footer-left, .footer-right {
    display: flex;
    align-items: center;
}

.footer-terms a {
    text-decoration: none;
    color: #5f6368;
    font-size: 14px;
}

.footer-subscribe span {
    color: #5f6368;
    font-size: 14px;
    margin-right: 10px;
}

.subscribe-button {
    background-color: #1a73e8;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
}

/* ------------------- */
/* media */
@media (max-width: 1200px) {
    .nav-item:not(.more) {
        display: none;
    }
    .nav-item.more {
        display: block;
    }
    .more-dropdown {
        display: block;
    }
}