body {
    max-width: 660px;
    font-family: 'Arial', 'Microsoft YaHei', sans-serif;
    margin: 0 auto;
    padding: 0;
    background-color: #f3e5f5;
    /* background-repeat:no-repeat; */

    /* background: url('/img/bo_bg.png'); */
    background-attachment: fixed; /* 关键点：背景固定 */
    /* 关键点：背景固定 */
    background-size: 100% 100%;
    color: #333;
}

header {
    width: 100%;
    max-width: 660px;
    display: flex;
    /* background-color: #171717; */
    background-color: #9c27b0;
    color: #ffffff;
    height: 6vh;
    z-index: 10;
}

#nav-open {
    display: block;
    position: relative;   
    height: 3vh;
}

#nav-close {
    display: none;
    position: relative;   
    height: 4vh;
}



.caogth-nav-logo img {
    height: 4vh;
    display: block;
}

.caogth-navbar {
    display: flex;
    background: linear-gradient(to right, #9c27b0, #6a1b9a);
    color: #fff;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0px 20px;
    position: relative;
}

.caogth-menu {
    display: flex;
    width: 70%;
    flex-direction: column;
    gap: 25px;
    background-color: #ffffff;
    position: absolute;
    align-items: start;
    height: 100vh;
    top: 6vh;
    right: 0px;
    padding: 35px 1.5rem;
    z-index: 10;
    margin: 0;
    list-style-type: none;
    display: none;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.1);
}

.caogth-menu li {
    position: relative;
    width: 100%;
    padding: 5px 0;
}

.caogth-menu li a:hover {
    color: #9c27b0;
    transform: translateX(5px);
}

.caogth-menu.open {
    display: flex;
    flex-direction: column;
}

.caogth-menu.open #nav-open {
    display: none;
}

.caogth-menu.open #nav-close {
    display: block;
}

.caogth-menu li a {
    font-size: 1.1rem;
    color: #333;
    text-decoration: none;
    transition: all 0.3s ease;
    display: block;
}

.caogth-menu li a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: #9c27b0;
    transition: width 0.3s ease;
}

.caogth-menu li a:hover::after {
    width: 100%;
}

#caogth-menu {
    animation: fadeIn 0.1s ease-in-out;
}

@keyframes fadeIn {
    0% {
        opacity: 0.3;
        width: 0%;
    }

    100% {
        opacity: 1;
        width: 30%;
    }
}

.caogth-game-item {
    border-radius: 10px;
    position: relative;
    background-color: #ffffff;
    padding: 10px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.caogth-game-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(156, 39, 176, 0.2);
}
.caogth-game-item a {
    
    text-decoration: none;
}

.caogth-game-cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius:8px;
    display: block;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease;
}

.caogth-game-item:hover .caogth-game-cover img {
    transform: scale(1.03);
}

.caogth-game-cover-recommend img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    display: block;
}

.caogth-game-item h3 {
    color: #fff;
    margin: 5px 0px;
    font-size: 0.75rem;

}

.caogth-game-item p {
    color: #000;
    margin: 0px;
    font-size: 1rem;
}

.caogth-game-info {
    display: flex;
    justify-content: center;
    align-items: start;
    flex-direction: column;
    padding: 8px 2px;
}

.caogth-game-info p {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5em;/* 这个值根据你的需求调整，它决定了每行的高度 */
    max-height: 4.5em; /* 这是行高的两倍，因为最多显示两行 */
    font-size: 0.95rem;
    color: #444;
    margin: 5px 0;
    font-weight: 500;
}

.caogth-game-info p:last-child {
 font-size: 0.8rem;
    color: #999;
    margin-top: 3px;
}

.common-game-right {
    display: flex;
    width: 20%;
    /* height: 25px; */
    /* background: linear-gradient(to bottom, #4BACEC, #3B0DAA); */
    border-radius: 5px;
    right: 0px;
    justify-content: center;
    align-items: center;
}

.common-game-right img {
    /* width: 60px; */
    /* height: 20px; */
}

.caogth-recomed-div {
    margin: 0px 10px;
    border-radius: 5px;
    padding: 10px 0px;

}

.caogth-detail-recomed-div {
    margin: 30px 20px;
}

.caogth-detail-recomed-div > div:first-child {
    margin-bottom: 20px;
}

.caogth-detail-recomed-div > div:first-child p {
    font-size: 1.4rem;
    color: #4a148c;
    font-weight: 600;
    margin: 0;
    padding: 10px 15px;
    background: linear-gradient(135deg, #f3e5f5, #ffffff);
    border-radius: 10px;
    display: inline-block;
    box-shadow: 0 4px 10px rgba(156, 39, 176, 0.1);
}

.caogth-common-recommend-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 10px;
    background-color: #9c27b0;
    border-radius: 10px;
}

.caogth-common-recommend-title p {
    color: #fff;
    font-size: 1rem;
    margin: 10px 0px;
    font-weight: bold;
}

.caogth-common-recommend-title img {
    width: 22px;
    height: 22px;
}

.caogth-common-recommend-content {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    /* Two columns layout */
    gap: 0.5rem;
    /* Gap between items */
}

.caogth-common-recommend-content-2 {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    /* Two columns layout */
    gap: 0.5rem;
    /* Gap between items */
}

.caogth-game-big-2 {
    grid-column: span 2;
    grid-row: span 2;
}

.game-big-3 {
    grid-column: span 3;
    grid-row: span 3;
}



footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 15px;
    background-color: #4a148c;
    text-align: center;
    margin-top: 30px;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.caogth-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 15px;
    /* Space between links */
    margin-bottom: 15px;
}

.caogth-footer-links a {
    font-size: 0.85em;
    color: 	#e1bee7 ;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    padding: 3px 0;
}

.caogth-footer-links a:hover {
    color: #ffffff;
}

.caogth-footer-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background-color: #ffffff;
    transition: width 0.3s ease;
}

.caogth-footer-links a:hover::after {
    width: 100%;
}

footer .caogth-copyright {
    font-size: 0.8em;
    color: 	#b39ddb ;
    margin: 10px 0px;
}

#back-top,
#back-home {
    width: 20px;
    height: 20px;
    cursor: pointer;
}

#flow {
    position: fixed;
    bottom: 2rem;
    right: 1rem;
    display: none;
    flex-direction: column;
    align-items: center;
    background-color: #ffffff;
    padding: 0.8rem;
    gap: 15px;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

#flow:hover {
    background-color: #ffffff;
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.25);
    transform: translateY(-2px);
}

#flow img {
    transition: all 0.3s ease;
}

#flow:hover img {
    transform: scale(1.1);
}

.caogth-game-detail-title {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 30px 1rem 20px;
    border-radius: 15px;
    background: linear-gradient(135deg, #ffffff, #f3e5f5);
    box-shadow: 0 6px 20px rgba(156, 39, 176, 0.1);
    margin: 0 20px;
}

.game-detail-iframe {
    width: 100%;
}

.caogth-game-detail-img {
    width: 85%;
    position: relative;
    margin-top: -100px;
    z-index: 2;
    transition: all 0.3s ease;
}

.caogth-game-detail-img img {
    width: 100%;
    border-radius: 15px;
    object-fit: cover;
    aspect-ratio: 1 / 0.8;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.caogth-game-detail-img:hover img {
    transform: scale(1.02);
    box-shadow: 0 15px 35px rgba(156, 39, 176, 0.2);
}

.caogth-detail-info {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    margin: 10px 20px 0;
    order: 1;
    text-align: center;
    max-width: 800px;
    width: 100%;
}

.caogth-detail-info p:first-child {
    color: #4a148c;
    font-size: 2rem;
    margin: 20px 0 15px;
    font-weight: 700;
    text-shadow: 0 2px 4px rgba(156, 39, 176, 0.1);
}

.caogth-detail-info p:last-child {
    color: #666;
    font-size: 1.1rem;
    margin: 10px 0px 20px;
    line-height: 1.6;
    padding: 0 15px;
}

.caogth-detail-info a {
    text-decoration: none;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    order: -1;
}

.caogth-game-instructions {
    display: flex;
    flex-wrap: wrap;
    margin: 30px 20px;
    background-color: #4a148c;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 6px 15px rgba(156, 39, 176, 0.2);
    position: relative;
    overflow: hidden;
}

.caogth-game-instructions::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    background: linear-gradient(90deg, #e040fb, #ba68c8, #9c27b0);
} 


.caogth-game-instructions p {
    color: #fff;
    line-height: 1.6rem;
    font-size: 1.1rem;
    margin: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.2);
}



.caogth-game-gameplay-button {
    display: flex;
    background: linear-gradient(135deg, #e040fb, #7b1fa2);
    border-radius: 15px;
    margin: 10px;
    width: 160px;
    height: 160px;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -80px;
    right: 20px;
    box-shadow: 0 10px 25px rgba(156, 39, 176, 0.4);
    transition: all 0.3s ease;
    z-index: 3;
}

.caogth-game-gameplay-button:hover {
    transform: scale(1.05) translateY(-5px);
    box-shadow: 0 15px 35px rgba(156, 39, 176, 0.5);
}

.caogth-game-gameplay-button img {
    width: 120px;
    height: 120px;
    transition: transform 0.3s ease;
}

.caogth-game-gameplay-button:hover img {
    transform: scale(1.1) rotate(5deg);
}
.caogth-game-gameplay-button p {
    color: #fff;
    margin: 0px;


}

.caogth-game-iframe {
    /* width: 100%; */
    /* max-width: 560px; */
    /* margin: 1rem 0; */
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 100vh;
    position: relative;
}
#iframe-menu-btn  {
    margin-top: 20px;
    margin-left: 60px;
    position: absolute;
    height: 40px;
    height: 40px;
}
#iframe-back-btn {
    margin-top: 20px;
    margin-left: 20px ;
    position: absolute;
    height: 50px;
    height: 50px;
}
.caogth-news-detail{
    color: #000;
    text-align: start;
    padding: 1rem;
    margin-top: 30px;
}
.caogth-news-detail img{
    width: 100%;
    object-fit: contain;
}

.error-page {

    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.error-page h1{
    font-size: 2em;
    color: #000;
}
.error-page p{
    font-size: 1.4em;
    color: #000;
    padding: 1rem;
    
}
.error-page img{
    width: 100%;
    padding: 2rem 1rem;
}

.caogth-game-mark {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    /* background-color: #000; */
    height: 4vh;
    position: absolute;
    border-radius: 0px 0px 10px 10px;
    top: -10px;
    left: -10px;
}

.caogth-game-mark img{
    width: 50px;
    height: 25px;
   
}

.caogth-game-new {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    /* background-color: #000; */
    height: 4vh;
    position: absolute;
    border-radius: 0px 0px 10px 10px;
    top: 0px;
    left: -10px;
}

.caogth-game-new img{
    width: 50px;
    height: 50px;
   
}

.caogth-game-mark p {
    color: #fff;
    font-size: 1rem;
    margin: 0px 10px;
}

#caogth-game-body {
    margin-top: 30px;
}

.iframe-menu {
    display: flex;
    width: 60%;
    flex-direction: column;
    gap: 35px;
    background-color: #fff;
    position: absolute;
    align-items: start;
    height: 100vh;
    top: 0vh;
    right: 0px;
    z-index: 8;
    margin: 0;
    list-style-type: none;
    display: none;
    padding: 10px 10px;
}

/* 展开菜单时的导航栏样式 */
.iframe-menu.open {
    display: flex;
    flex-direction: column;
}

.iframe-menu li a {
    font-size: 1rem;
    color: #000;
    text-decoration: none;
}

.iframe-list-item a{
    display: flex;
    flex-direction: row;
    margin: 0px;
    justify-content: space-between;
    align-items: center;
  
}

.iframe-list-item a img {
    margin: 0px;
    height: 40px;
    height: 40px;
    border-radius: 5px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    display: block;
}

.iframe-list-item a p {
    margin: 0px 20px;
    position: relative;
}

.iframe-list-item-close a{
    display: flex;
    flex-direction: row;
    margin: 0px;
    justify-content: end;
    align-items: center;
  
}

.iframe-list-item-close img {
    margin: 0px;
    height: 40px;
    height: 40px;
    border-radius: 5px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    display: block;
}


#iframe-close-btn {
    right: 0px;
    top: 0px;
}






