body {
    max-width: 660px;
    font-family: Arial, sans-serif;
    margin: 0 auto;
    padding: 0;
    background-color: #0a0a0a;
    background-image: linear-gradient(45deg, #0a0a0a 25%, #1a1a1a 25%, #1a1a1a 50%, #0a0a0a 50%, #0a0a0a 75%, #1a1a1a 75%, #1a1a1a 100%);
    background-size: 10px 10px;
    background-repeat: repeat;
    background-attachment: fixed; /* 关键点：背景固定 */
    color: #e0e0e0;
}

header {
    width: 100%;
    max-width: 660px;
    display: flex;
    background: linear-gradient(90deg, #8b0000, #4a0000);
    color: #ffffff;
    height: 6vh;
    position: fixed;
    top: 0px;
    z-index: 10;
    box-shadow: 0 2px 10px rgba(255, 0, 0, 0.2);
}

#nav-open {
    display: block;
    position: relative;   
    height: 3vh;
}

#nav-close {
    display: none;
    position: relative;   
    height: 4vh;
}



.sofuwa-nav-logo img {
    height: 4vh;
    display: block;
}

.sofuwa-navbar {
    display: flex;
    color: #fff;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0px 20px;
    position: relative;
}

.sofuwa-menu {
    display: flex;
    width: 30%;
    flex-direction: column;
    gap: 35px;
    background: linear-gradient(180deg, #1a1a1a 0%, #0a0a0a 100%);
    position: absolute;
    align-items: start;
    height: 100vh;
    top: 6vh;
    right: 0px;
    padding: 35px 1rem;
    z-index: 10;
    margin: 0;
    list-style-type: none;
    display: none;
    box-shadow: -2px 0 10px rgba(255, 0, 0, 0.2);
    border-left: 2px solid #8b0000;
}

.sofuwa-menu li {
    position: relative;

}

.sofuwa-menu li a:hover {
    color: #ff3333;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.sofuwa-menu.open {
    display: flex;
    flex-direction: column;
}

.sofuwa-menu.open #nav-open {
    display: none;
}

.sofuwa-menu.open #nav-close {
    display: block;
}

.sofuwa-menu li a {
    font-size: 1rem;
    color: #fff;
    text-decoration: none;
}

#sofuwa-menu {
    animation: fadeIn 0.1s ease-in-out;
}

@keyframes fadeIn {
    0% {
        opacity: 0.3;
        width: 0%;
    }

    100% {
        opacity: 1;
        width: 30%;
    }
}

.sofuwa-game-item {
    border-radius: 5px;
    position: relative;
    border: 1px solid #4a0000;
    background-color: #1a1a1a;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.1);
}
.sofuwa-game-item a {
    
    text-decoration: none;
}

.sofuwa-game-cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1.1;
    object-fit: cover;
    border-radius:5px;
    display: block;
    box-shadow: 0px 4px 15px rgba(0,0,0,0.5);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.sofuwa-game-cover img:hover {
    transform: translateY(-5px);
    box-shadow: 0px 6px 20px rgba(255, 0, 0, 0.3);
}

.sofuwa-game-cover-recommend img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 10px;
    display: block;
    box-shadow: 0px 4px 15px rgba(0,0,0,0.5);
}

.sofuwa-game-item h3 {
    color: #ff6666;
    margin: 5px 0px;
    font-size: 0.75rem;

}

.sofuwa-game-item p {
    color: #e0e0e0;
    margin: 0px;
    font-size: 1rem;
}

.sofuwa-game-info {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 5px;
    flex-direction: column;
    background-color: #1a1a1a;
}

.sofuwa-game-info p {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    line-height: 1.5em;/* 这个值根据你的需求调整，它决定了每行的高度 */
    max-height: 6em; /* 这是行高的两倍，因为最多显示两行 */
    font-size: 0.8rem;
    color: #e0e0e0;
}

.common-game-right {
    display: flex;
    width: 20%;
    border-radius: 5px;
    right: 0px;
    justify-content: center;
    align-items: center;
}

.common-game-right img {
    filter: invert(1) drop-shadow(0 0 2px rgba(255, 0, 0, 0.5));
}

.sofuwa-recomed-div {
    margin: 0px 10px;
    border-radius: 5px;
    padding: 10px 0px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid #4a0000;

}

.sofuwa-detail-recomed-div {
    margin: 10px 20px;
    border-radius: 5px;
    padding: 10px 0px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid #4a0000;

}

.sofuwa-common-recommend-title {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0px 10px;
    background: linear-gradient(90deg, #8b0000, #4a0000);
    border-radius: 10px;
    box-shadow: 0 0 10px rgba(255, 0, 0, 0.2);
}

.sofuwa-common-recommend-title p {
    color: #fff;
    font-size: 1rem;
    margin: 10px 0px;
    font-weight: bold;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.sofuwa-common-recommend-title img {
    width: 22px;
    height: 22px;
    filter: invert(1) drop-shadow(0 0 2px rgba(255, 0, 0, 0.5));
}

.sofuwa-common-recommend-content {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.sofuwa-common-recommend-content-2 {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.sofuwa-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: 10px;
    background: linear-gradient(90deg, #8b0000, #4a0000);
    text-align: center;
    color: #ffffff;
    box-shadow: 0 -2px 10px rgba(255, 0, 0, 0.2);
}

.sofuwa-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.sofuwa-footer-links a {
    font-size: 0.7em;
    color: #ffcccc; 
    text-decoration: none;
    transition: color 0.3s ease;
}

.sofuwa-footer-links a:hover {
    text-decoration: underline;
    color: #ff6666;
}

footer .sofuwa-copyright {
    font-size: 0.8em;
    color: #ffcccc; 
    margin: 10px 0px;
}

#back-top,
#back-home {
    width: 20px;
    height: 20px;
    cursor: pointer;
    filter: invert(1) drop-shadow(0 0 2px rgba(255, 0, 0, 0.5));
}

#flow {
    position: fixed;
    bottom: 10rem;
    right: 0.6rem;
    display: none;
    flex-direction: column;
    align-items: center;
    background: linear-gradient(135deg, #8b0000, #4a0000);
    padding: 0.5rem;
    gap: 10PX;
    border-radius: 10rem;
    box-shadow: 0 4px 12px rgba(255, 0, 0, 0.4);
    transition: transform 0.3s, box-shadow 0.3s;
}

#flow:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(255, 0, 0, 0.6);
}

#flow:hover {
    background-color: #A0A0A0(255, 255, 255, 1.0);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.sofuwa-game-detail-title {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0px 1rem;
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid #4a0000;
}

.game-detail-iframe {
    width: 100%;
}

.sofuwa-game-detail-img {
    width: 100%;
}

.sofuwa-game-detail-img img {
    width: 60%;
    border-radius: 10px;
    object-fit: cover;
    aspect-ratio: 1 / 0.8;
    display: block;
    box-shadow: 0 0 15px rgba(255, 0, 0, 0.3);
}

.sofuwa-detail-info {
    position: relative;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    margin: 0px 20px;
    order: 1;
}

.sofuwa-detail-info h2 {
    color: #ff6666;
    font-size: 1rem;
    margin: 10px;
    font-weight: 300;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.sofuwa-detail-info p {
    color: #e0e0e0;
    font-size: 1rem;
    margin: 10px 0px;

}

.sofuwa-detail-info a {
    text-decoration: none;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    order: -1;
}

.sofuwa-game-instructions {
    display: flex;
    flex-wrap: wrap;
    margin: 10px 20px;
    background: linear-gradient(135deg, #1a1a1a 0%, #0a0a0a 100%);
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(255, 0, 0, 0.1);
    border: 1px solid #4a0000;
}


.sofuwa-game-instructions p {
    color: #e0e0e0;
    line-height: 1.5rem;
    font-size : 1rem;
}



.sofuwa-game-gameplay-button {
    display: flex;
    border-radius: 10px;
    margin: 10px;
    width: 50%;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -140px; 
    right: -30px;   
}

.sofuwa-game-gameplay-button img {
    width: 120px;
    height: 120px;
    filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.5));

}
.sofuwa-game-gameplay-button p {
    color: #fff;
    margin: 0px;


}

.sofuwa-game-iframe {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    height: 100vh;
    position: relative;
    background-color: #0a0a0a;
}
#iframe-menu-btn  {
    margin-top: 20px;
    margin-left: 60px;
    position: absolute;
    height: 40px;
    height: 40px;
    filter: invert(1) drop-shadow(0 0 2px rgba(255, 0, 0, 0.5));
}
#iframe-back-btn {
    margin-top: 20px;
    margin-left: 20px ;
    position: absolute;
    height: 50px;
    height: 50px;
    filter: invert(1) drop-shadow(0 0 2px rgba(255, 0, 0, 0.5));
}
.sofuwa-news-detail{
    color: #e0e0e0;
    text-align: start;
    padding: 1rem;
    margin-top: 8vh;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid #4a0000;
    border-radius: 10px;
}
.sofuwa-news-detail img{
    width: 100%;
    object-fit: contain;
    filter: drop-shadow(0 0 5px rgba(255, 0, 0, 0.3));
}

.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    background-color: #0a0a0a;
    padding: 2rem;
}
.error-page h1{
    font-size: 2em;
    color: #ff3333;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.5);
}
.error-page p{
    font-size: 1.4em;
    color: #e0e0e0;
    padding: 1rem;
    
}
.error-page img{
    width: 100%;
    padding: 2rem 1rem;
    filter: invert(1) drop-shadow(0 0 5px rgba(255, 0, 0, 0.3));
}

.sofuwa-game-mark {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    height: 4vh;
    position: absolute;
    border-radius: 0px 0px 10px 10px;
    top: -10px;
    left: -10px;
}

.sofuwa-game-mark img{
    width: 50px;
    height: 25px;
    filter: invert(1) drop-shadow(0 0 2px rgba(255, 0, 0, 0.5));
}

.sofuwa-game-new {
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: start;
    height: 4vh;
    position: absolute;
    border-radius: 0px 0px 10px 10px;
    top: 0px;
    left: -10px;
}

.sofuwa-game-new img{
    width: 50px;
    height: 50px;
    filter: invert(1) drop-shadow(0 0 2px rgba(255, 0, 0, 0.5));
}

.sofuwa-game-mark p {
    color: #ffcccc;
    font-size: 1rem;
    margin: 0px 10px;
}

#sofuwa-game-body {
    margin-top: 8vh;
}

.iframe-menu {
    display: flex;
    width: 60%;
    flex-direction: column;
    gap: 35px;
    background-color: #1a1a1a;
    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;
    border-left: 2px solid #8b0000;
    box-shadow: -5px 0 15px rgba(255, 0, 0, 0.2);
}

/* 展开菜单时的导航栏样式 */
.iframe-menu.open {
    display: flex;
    flex-direction: column;
}

.iframe-menu li a {
    font-size: 1rem;
    color: #e0e0e0;
    text-decoration: none;
    transition: color 0.3s ease;
}

.iframe-menu li a:hover {
    color: #ff3333;
    text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
}

.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;
    box-shadow: 0 0 5px rgba(255, 0, 0, 0.3);
}

.iframe-list-item a p {
    margin: 0px 20px;
    position: relative;
    color: #e0e0e0;
}

.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;
    filter: invert(1) drop-shadow(0 0 2px rgba(255, 0, 0, 0.5));
}


#iframe-close-btn {
    right: 0px;
    top: 0px;
}

/* 添加恐怖风格的全局样式 */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(ellipse at center, rgba(139, 0, 0, 0.1) 0%, transparent 70%);
    pointer-events: none;
    z-index: -1;
    animation: pulseBackground 5s infinite alternate;
}

@keyframes pulseBackground {
    0% {
        background: radial-gradient(ellipse at center, rgba(139, 0, 0, 0.1) 0%, transparent 70%);
    }
    100% {
        background: radial-gradient(ellipse at center, rgba(139, 0, 0, 0.2) 0%, transparent 60%);
    }
}

/* 恐怖风格的边框效果 */
.horror-border {
    position: relative;
    border: 2px solid transparent;
}

.horror-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8b0000, #4a0000, #8b0000);
    border-radius: inherit;
    z-index: -1;
    animation: borderPulse 2s infinite;
    opacity: 0.7;
}

@keyframes borderPulse {
    0%, 100% {
        opacity: 0.5;
        filter: blur(2px);
    }
    50% {
        opacity: 0.9;
        filter: blur(0);
    }
}

/* 添加恐怖风格的悬停效果 */
.horror-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 0 20px rgba(255, 0, 0, 0.5);
    animation: shake 0.5s ease-in-out;
}

@keyframes shake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-2px); }
    75% { transform: translateX(2px); }
}

/* 恐怖风格的文字效果 */
.horror-text {
    color: #ff6666;
    text-shadow: 0 0 10px rgba(255, 0, 0, 0.7);
    letter-spacing: 0.5px;
    animation: textGlow 3s infinite alternate;
}

@keyframes textGlow {
    0% {
        text-shadow: 0 0 5px rgba(255, 0, 0, 0.5);
    }
    100% {
        text-shadow: 0 0 15px rgba(255, 0, 0, 0.8);
    }
}

/* 给游戏卡片添加恐怖效果 */
.sofuwa-game-item,
.recommend-item {
    position: relative;
    overflow: hidden;
}

.sofuwa-game-item::after,
.recommend-item::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, transparent 48%, rgba(255, 0, 0, 0.05) 49%, rgba(255, 0, 0, 0.05) 51%, transparent 52%);
    background-size: 10px 10px;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sofuwa-game-item:hover::after,
.recommend-item:hover::after {
    opacity: 1;
}

/* 添加恐怖风格的按钮效果 */
button, .btn-like {
    position: relative;
    overflow: hidden;
}

button::before, .btn-like::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 300px;
    height: 300px;
    background: rgba(255, 0, 0, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%) scale(0);
    transition: transform 0.5s ease;
}

button:hover::before, .btn-like:hover::before {
    transform: translate(-50%, -50%) scale(1);
}

/* 添加滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #1a1a1a;
}

::-webkit-scrollbar-thumb {
    background: #8b0000;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff3333;
}

/* 给所有图片添加恐怖风格的滤镜 */
img:not(.keep-original) {
    transition: all 0.3s ease;
}

img:not(.keep-original):hover {
    filter: hue-rotate(180deg) saturate(1.5) drop-shadow(0 0 8px rgba(255, 0, 0, 0.4));
}

/* 添加恐怖风格的加载动画 */
@keyframes horrorLoad {
    0% {
        width: 0%;
        background-color: #8b0000;
    }
    50% {
        width: 50%;
        background-color: #ff3333;
    }
    100% {
        width: 100%;
        background-color: #8b0000;
    }
}

.horror-loader {
    height: 3px;
    background-color: #8b0000;
    animation: horrorLoad 1.5s ease-in-out infinite;
}