/* ===== 全局基础 ===== */
body {
    max-width: 660px;
    font-family: 'Segoe UI', 'PingFang SC', Arial, sans-serif;
    margin: 0 auto;
    padding: 0;
    background: #f0f4f8;
    color: #1e293b;
}

* {
    box-sizing: border-box;
}

/* ===== Header ===== */
header {
    width: 100%;
    max-width: 660px;
    display: flex;
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
    color: #ffffff;
    height: 6vh;
    z-index: 10;
    box-shadow: 0 2px 16px rgba(13, 148, 136, 0.3);
}

/* ===== 导航菜单图标 ===== */
#nav-open {
    display: block;
    position: relative;
    height: 3vh;
}

#nav-close {
    display: none;
    position: relative;
    height: 4vh;
}

.ycdbo-nav-logo img {
    height: 4vh;
    display: block;
}

/* ===== 导航栏 ===== */
.ycdbo-navbar {
    display: flex;
    color: #fff;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 0px 20px;
    position: relative;
}

/* ===== 侧边菜单 ===== */
.ycdbo-menu {
    display: flex;
    width: 58%;
    flex-direction: column;
    gap: 24px;
    background: linear-gradient(180deg, #ffffff 0%, #f0fdfa 100%);
    position: absolute;
    align-items: start;
    height: 100vh;
    top: 6vh;
    right: 0px;
    padding: 30px 14px;
    z-index: 10;
    margin: 0;
    list-style-type: none;
    display: none;
    box-shadow: -4px 0 20px rgba(13, 148, 136, 0.12);
    border-left: 3px solid #0d9488;
    backdrop-filter: blur(8px);
}

.ycdbo-menu li {
    position: relative;
    width: 100%;
}

.ycdbo-menu li a {
    font-size: 0.92rem;
    color: #475569;
    text-decoration: none;
    transition: all 0.25s ease;
    padding: 9px 14px;
    border-radius: 10px;
    display: block;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.ycdbo-menu li a:hover {
    color: #0d9488;
    background: rgba(13, 148, 136, 0.08);
    transform: translateX(4px);
}

.ycdbo-menu.open {
    display: flex;
    flex-direction: column;
}

.ycdbo-menu.open #nav-open {
    display: none;
}

.ycdbo-menu.open #nav-close {
    display: block;
}

#ycdbo-menu {
    animation: fadeIn 0.25s ease-in-out;
}

@keyframes fadeIn {
    0% {
        opacity: 0.3;
        width: 0%;
    }
    100% {
        opacity: 1;
        width: 58%;
    }
}

/* ===== 游戏卡片 ===== */
.ycdbo-game-item {
    border-radius: 16px;
    position: relative;
    padding: 7px;
    background: #ffffff;
    box-shadow: 0 1px 8px rgba(0, 0, 0, 0.05);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    border: 1.5px solid #e2e8f0;
}

.ycdbo-game-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(13, 148, 136, 0.15);
    border-color: #0d9488;
}

.ycdbo-game-item a {
    text-decoration: none;
}

/* ===== 游戏封面图 ===== */
.ycdbo-game-cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    display: block;
    box-shadow: 0px 2px 6px rgba(0, 0, 0, 0.06);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.ycdbo-game-cover-recommend img {
    width: 100%;
    height: auto;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}

.ycdbo-game-item:hover .ycdbo-game-cover img {
    transform: scale(1.05);
}

/* ===== 游戏标题 & 文字 ===== */
.ycdbo-game-item h3 {
    color: #0d9488;
    margin: 5px 0px;
    font-size: 0.75rem;
    font-weight: 700;
}

.ycdbo-game-item p {
    color: #475569;
    margin: 0px;
    font-size: 1rem;
}

.ycdbo-game-info {
    display: flex;
    justify-content: center;
    align-items: start;
    flex-direction: column;
    padding: 6px;
}

.ycdbo-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.88rem;
    color: #475569;
    font-weight: 500;
}

.ycdbo-game-info p:last-child {
    font-size: 0.78rem;
    color: #94a3b8;
}

/* ===== 通用右侧按钮 ===== */
.common-game-right {
    display: flex;
    width: 20%;
    height: 30px;
    background: linear-gradient(135deg, #0d9488, #0891b2);
    border-radius: 20px;
    right: 0px;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 10px rgba(13, 148, 136, 0.25);
    transition: all 0.3s ease;
}

/* ===== 推荐区块 ===== */
.ycdbo-recomed-div {
    margin: 0px 10px;
    border-radius: 10px;
    padding: 10px 0px;
}

.ycdbo-detail-recomed-div {
    margin: 10px 20px;
    border-radius: 10px;
    padding: 10px 0px;
}

/* ===== 分类标题 ===== */
.ycdbo-common-recommend-title {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 12px 15px;
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
    border-radius: 14px;
    position: relative;
    box-shadow: 0 3px 12px rgba(13, 148, 136, 0.2);
}

.ycdbo-common-recommend-title::before,
.ycdbo-common-recommend-title::after {
    content: "◆";
    position: absolute;
    color: rgba(255, 255, 255, 0.5);
    font-size: 0.6rem;
}

.ycdbo-common-recommend-title::before {
    left: 15px;
}

.ycdbo-common-recommend-title::after {
    right: 15px;
}

.ycdbo-common-recommend-title p {
    color: #ffffff;
    font-size: 1.05rem;
    margin: 0;
    font-weight: 700;
    text-align: center;
    letter-spacing: 1.5px;
}

.ycdbo-common-recommend-title img {
    display: none;
}

/* ===== 网格布局 ===== */
.ycdbo-common-recommend-content {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
}

.ycdbo-common-recommend-content-2 {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.5rem;
}

.ycdbo-game-big-2 {
    grid-column: span 2;
    grid-row: span 2;
}

.game-big-3 {
    grid-column: span 3;
    grid-row: span 3;
}

/* ===== Footer ===== */
footer {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 18px 10px;
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
    text-align: center;
}

.ycdbo-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 10px;
}

.ycdbo-footer-links a {
    font-size: 0.72em;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
    padding: 2px 6px;
    border-radius: 4px;
}

.ycdbo-footer-links a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.1);
}

footer .ycdbo-copyright {
    font-size: 0.78em;
    color: rgba(255, 255, 255, 0.85);
    margin: 10px 0px;
}

/* ===== 回到顶部 / 回到首页 ===== */
#back-top,
#back-home {
    width: 22px;
    height: 22px;
    cursor: pointer;
    opacity: 0.8;
    transition: all 0.3s ease;
}

#back-top:hover,
#back-home:hover {
    opacity: 1;
    transform: scale(1.1);
}

#flow {
    position: fixed;
    bottom: 10rem;
    right: 0.6rem;
    display: none;
    flex-direction: column;
    align-items: center;
    background: #ffffff;
    padding: 0.5rem;
    gap: 10PX;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(13, 148, 136, 0.15);
    border: 1px solid #e2e8f0;
    transition: box-shadow 0.3s;
}

#flow:hover {
    box-shadow: 0 4px 20px rgba(13, 148, 136, 0.25);
}

/* ===== 游戏详情页 ===== */
.ycdbo-game-detail-title {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0px 1rem;
    border-radius: 12px;
}

.game-detail-iframe {
    width: 100%;
}

.ycdbo-game-detail-img {
    width: 80%;
}

.ycdbo-game-detail-img img {
    width: 100%;
    border-radius: 12px;
    object-fit: cover;
    aspect-ratio: 1 / 0.8;
    display: block;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.ycdbo-detail-info {
    position: relative;
    bottom: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    margin: 0px 20px;
    order: 1;
}

.ycdbo-detail-info h2 {
    color: #1e293b;
    font-size: 1rem;
    margin: 10px;
    font-weight: 400;
}

.ycdbo-detail-info p {
    color: #475569;
    font-size: 0.95rem;
    margin: 10px 0px;
    line-height: 1.6;
}

.ycdbo-detail-info a {
    text-decoration: none;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    order: -1;
}

/* ===== 游戏说明 ===== */
.ycdbo-game-instructions {
    display: flex;
    flex-wrap: wrap;
    margin: 10px 20px;
    background: linear-gradient(135deg, #0d9488 0%, #0891b2 100%);
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 3px 12px rgba(13, 148, 136, 0.15);
}

.ycdbo-game-instructions p {
    color: #ffffff;
    line-height: 1.6rem;
    font-size: 0.95rem;
}

/* ===== 游戏按钮 ===== */
.ycdbo-game-gameplay-button {
    display: flex;
    background: linear-gradient(135deg, #f59e0b 0%, #f97316 100%);
    border-radius: 12px;
    margin: 10px;
    width: 50%;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: -140px;
    right: -10px;
    box-shadow: 0 5px 20px rgba(245, 158, 11, 0.35);
    transition: all 0.3s ease;
}

.ycdbo-game-gameplay-button:hover {
    transform: scale(1.05);
    box-shadow: 0 8px 28px rgba(245, 158, 11, 0.45);
}

.ycdbo-game-gameplay-button img {
    width: 120px;
    height: 120px;
}

.ycdbo-game-gameplay-button p {
    color: #fff;
    margin: 0px;
}

/* ===== 游戏 iframe 区域 ===== */
.ycdbo-game-iframe {
    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;
}

#iframe-back-btn {
    margin-top: 20px;
    margin-left: 20px;
    position: absolute;
    height: 50px;
}

/* ===== 新闻详情 ===== */
.ycdbo-news-detail {
    color: #475569;
    text-align: start;
    padding: 1rem;
    margin-top: 30px;
    line-height: 1.7;
}

.ycdbo-news-detail h3 {
    color: #0d9488;
    font-weight: 700;
    margin-bottom: 16px;
}

.ycdbo-news-detail h4 {
    color: #1e293b;
    font-weight: 600;
    margin-top: 20px;
    margin-bottom: 8px;
}

.ycdbo-news-detail img {
    width: 100%;
    object-fit: contain;
}

/* ===== 404 错误页 ===== */
.error-page {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.error-page h1 {
    font-size: 2em;
    color: #0d9488;
}

.error-page p {
    font-size: 1.4em;
    color: #475569;
    padding: 1rem;
}

.error-page img {
    width: 100%;
    padding: 2rem 1rem;
}

/* ===== 游戏标记 ===== */
.ycdbo-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;
}

.ycdbo-game-mark img {
    width: 50px;
    height: 25px;
}

.ycdbo-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;
}

.ycdbo-game-new img {
    width: 50px;
    height: 50px;
}

.ycdbo-game-mark p {
    color: #fff;
    font-size: 1rem;
    margin: 0px 10px;
}

#ycdbo-game-body {
    margin-top: 30px;
}

/* ===== iframe 侧边菜单 ===== */
.iframe-menu {
    display: flex;
    width: 60%;
    flex-direction: column;
    gap: 35px;
    background: linear-gradient(180deg, #ffffff, #f0f4f8);
    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: 3px solid #0d9488;
}

.iframe-menu.open {
    display: flex;
    flex-direction: column;
}

.iframe-menu li a {
    font-size: 1rem;
    color: #475569;
    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;
    border-radius: 8px;
    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;
    border-radius: 8px;
    object-fit: cover;
    aspect-ratio: 1 / 1;
    display: block;
}

#iframe-close-btn {
    right: 0px;
    top: 0px;
}
