/* 添加以下CSS样式 */
.iframe-container {
    max-width: 960px; /* 调整为与其他内容区域一致的宽度 */
    margin: 20px auto;
    padding: 0 20px; /* 保持左右边距与其他内容一致 */
    width: 100%;
    box-sizing: border-box;
}

/* 移动端适配 */
@media (max-width: 1000px) { /* 调整断点以匹配其他响应式布局 */
    .iframe-container {
        max-width: 600px; /* 匹配移动端其他内容区域宽度 */
    }
}

@media (max-width: 650px) { /* 添加更小屏幕的断点 */
    .iframe-container {
        padding: 0 10px; /* 减小移动端padding */
    }
}

.iframe-wrapper {
    position: relative;
    width: 100%;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: auto; 
    margin: 0 0;
    max-height: 105vh; 
}

.iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    min-height: 955px;
    height: 955px; /* 设置固定高度为955px */
    max-height: 955px; /* 设置固定高度为955px */
    border-radius: 8px;
    border: none;
    display: block; /* 移除iframe底部间隙 */
}

@media (max-width: 768px) {
    .iframe-wrapper iframe {
        height: 955px; /* 设置固定高度为955px */
        min-height: 955px; /* 设置固定高度为955px */
        max-height: 955px; /* 设置固定高度为955px */
    }
    
    .iframe-wrapper {
        overflow-y: auto; /* 确保在移动端显示垂直滚动条 */
        max-height: 85vh; /* 移动端设置最大高度 */
    }
}

.iframe-controls {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 10px;
    background: #f5f5f5;
    border-radius: 0 0 8px 8px;
}

@media (max-width: 768px) {
    .iframe-controls {
        padding: 8px;
        gap: 8px;
    }
}

.control-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: none;
    border-radius: 4px;
    background: #fff;
    cursor: pointer;
    transition: all 0.2s ease;
    -webkit-tap-highlight-color: transparent; /* 移除移动端点击高亮 */
}

@media (max-width: 768px) {
    .control-button {
        width: 32px;
        height: 32px;
    }
}

.control-button:hover {
    background: #eee;
}

.control-button:active {
    background: #ddd;
    transform: scale(0.95);
}

.control-button svg {
    width: 20px;
    height: 20px;
    color: #666;
}

@media (max-width: 768px) {
    .control-button svg {
        width: 18px;
        height: 18px;
    }
}

@media (prefers-color-scheme: dark) {
    .iframe-wrapper {
        background: #222;
    }
    
    .iframe-controls {
        background: #333;
    }
    
    .control-button {
        background: #444;
    }
    
    .control-button:hover {
        background: #555;
    }
    
    .control-button:active {
        background: #666;
    }
    
    .control-button svg {
        color: #fff;
    }
}

.iframe-container {
    position: relative;
    width: 100%;
    height: auto; /* 改为自动高度 */
    max-height: 90vh; /* 与iframe-wrapper保持一致 */
    overflow: hidden; /* 防止出现双滚动条 */
}

.iframe-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

.iframe-wrapper iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.iframe-controls {
    position: absolute;
    bottom: 10px;
    right: 10px;
    display: flex;
    gap: 8px;
    z-index: 1000;
}

.control-button {
    background: rgba(255, 255, 255, 0.8);
    border: none;
    border-radius: 4px;
    padding: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s;
}

.control-button svg {
    width: 24px;
    height: 24px;
}

.control-button:hover {
    background: rgba(255, 255, 255, 0.9);
}

/* 移动端适配 */
@media (max-width: 768px) {
    .iframe-controls {
        position: absolute;
        bottom: 10px;
        right: 10px;
        display: flex;
        gap: 8px;
        z-index: 1000;
    }

    .control-button {
        background: rgba(255, 255, 255, 0.8);
        border: none;
        border-radius: 4px;
        padding: 8px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background-color 0.3s;
    }

    .control-button svg {
        width: 24px;
        height: 24px;
    }

    .control-button:hover {
        background: rgba(255, 255, 255, 0.9);
    }
}

/* 处理横屏模式 */
@media (orientation: landscape) and (max-width: 896px) {
    .iframe-container {
        height: 100vh;
    }
}

.header {
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    position: static; /* 从fixed改为static，防止遮挡iframe */
    z-index: 1000;
}

.nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.nav__logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: #333;
    font-weight: bold;
}

.nav__logo img {
    height: 32px;
    margin-right: 10px;
}

.nav__menu {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
    gap: 2rem;
}

.nav__menu li a {
    text-decoration: none;
    color: #333;
    font-weight: 500;
    transition: color 0.3s;
}

.nav__menu li a:hover,
.nav__menu li a.active {
    color: #4CAF50;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.language-selector .icon {
    width: 20px;
    height: 20px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .nav__menu {
        gap: 1rem;
        font-size: 14px;
    }

    .nav__logo img {
        height: 24px;
    }

    .nav__logo span {
        display: none;
    }
}

.language-dropdown {
    position: relative;
}

.language-selector {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.arrow-icon {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

.language-menu {
    position: absolute;
    top: 100%;
    right: 0;
    background: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    padding: 0.5rem 0;
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s;
}

.language-dropdown:hover .language-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.language-dropdown:hover .arrow-icon {
    transform: rotate(180deg);
}

.language-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    text-decoration: none;
    color: #333;
    transition: background-color 0.3s;
}

.language-item:hover {
    background-color: #f5f5f5;
}

.language-item.active {
    color: #4CAF50;
    background-color: #f0f9f0;
}

.language-item .icon {
    width: 20px;
    height: 20px;
}

/* 移动端适配 */
@media (max-width: 768px) {
    .language-menu {
        right: -10px;
    }

    .language-item {
        padding: 0.75rem 1rem;
    }
}