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