/* 基础样式保持不变 */
.nav-menu {
    display: flex;
}

.nav-toggle {
    display: none;
}

.language-dropdown {
    position: relative;
    display: inline-block;
}

.language-dropdown-content {
    position: absolute;
    right: 0;
    min-width: 160px;
    z-index: 1000;
    border-radius: 0.375rem;
    overflow: hidden;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.language-dropdown-content a {
    padding: 0.75rem 1rem;
    display: block;
    background-color: #553C9A;
    transition: all 0.2s;
}

.language-dropdown-content a:hover {
    background-color: #6B46C1;
}

/* 移动端样式优化 */
@media screen and (max-width: 768px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: #6B46C1;
        z-index: 999;
        border-radius: 0 0 0.375rem 0.375rem;
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        padding: 0.75rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    }

    .nav-menu a:last-child {
        border-bottom: none;
    }

    .nav-toggle {
        display: block;
    }

    /* 移动端语言切换样式优化 */
    .mobile-language-dropdown {
        position: relative;
    }

    .mobile-language-dropdown .language-dropdown-content {
        right: 0;
        top: 100%;
        margin-top: 0.5rem;
    }

    .search-input {
        width: 240px;
        height: 36px;
        padding: 0.5rem 2.5rem;
        border-radius: 0.5rem;
        background-color: rgba(255, 255, 255, 0.2);
        color: white;
        border: none;
    }

    .search-input::placeholder {
        color: rgba(255, 255, 255, 0.6);
    }

    @media (max-width: 767px) {
        .search-input {
            width: 160px;
            height: 32px;
            font-size: 14px;
        }
    }
}

/* 导航菜单样式 */
.nav-menu {
    display: flex;
    transition: all 0.3s ease-in-out;
}

.nav-toggle {
    display: none;
    transition: transform 0.3s ease-in-out;
}

.nav-toggle.active {
    transform: rotate(90deg);
}

@media screen and (max-width: 767px) {
    .nav-menu {
        display: none;
        flex-direction: column;
        width: 100%;
        position: absolute;
        top: 100%;
        left: 0;
        background-color: rgba(88, 28, 135, 0.85);
        backdrop-filter: blur(10px);
        z-index: 1000;
        padding: 0.5rem 0;
        border-radius: 0 0 10px 10px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    }

    .nav-menu.active {
        display: flex;
    }

    .nav-menu a {
        padding: 1rem;
        padding-left: 2rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        text-align: left;
        transition: background-color 0.3s ease;
    }

    .nav-menu a:last-child {
        border-bottom: none;
    }

    .nav-menu a:hover, .nav-menu a:focus {
        background-color: rgba(255, 255, 255, 0.1);
    }

    .nav-toggle {
        display: block;
    }
}

/* 语言切换样式 */
.language-toggle {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    font-size: 0.9rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.language-toggle:hover {
    background: rgba(255, 255, 255, 0.2);
}

.language-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 160px;
    background: white;
    border-radius: 4px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: 0.5rem;
    z-index: 1000;
}

.language-dropdown.show {
    display: block;
}

.dropdown-item {
    display: block;
    padding: 0.75rem 1rem;
    color: #4a5568;
    text-decoration: none;
    transition: all 0.2s ease;
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: #f7fafc;
    color: #2d3748;
}

/* 搜索框相关样式 */
.search-container {
    display: flex;
    align-items: center;
    margin-right: 0; /* 移除右边距 */
}

.search-form {
    position: relative;
}

.search-input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input {
    width: 256px;
    height: 40px;
    padding: 0.5rem 2.5rem;
    border-radius: 0.5rem;
    background-color: rgba(147, 51, 234, 0.5);
    color: white;
    border: none;
    outline: none;
    transition: all 0.3s ease;
}

.search-input::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.search-input:focus {
    background-color: rgba(147, 51, 234, 0.7);
    box-shadow: 0 0 0 2px rgba(147, 51, 234, 0.3);
}

.search-submit {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
}

.search-clear {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    padding: 0;
    transition: color 0.3s ease;
}

.search-clear:hover {
    color: white;
}

/* 移动端搜索框样式 */
.mobile-search {
    display: none;
}

/* 响应式调整 */
@media screen and (max-width: 767px) {
    .desktop-search {
        display: none;
    }

    .mobile-search {
        display: block;
    }

    .search-container {
        order: 1; /* 将搜索框移到语言选择器后面 */
        margin-left: 1rem; /* 添加左边距 */
    }

    .search-input {
        width: 140px; /* 调整移动端搜索框宽度 */
        height: 36px;
        font-size: 14px;
    }

    .search-submit svg,
    .search-clear svg {
        width: 18px;
        height: 18px;
    }
}

/* 工具类 */
.hidden {
    display: none !important;
}

/* 内容页全屏、重新加载 */
.iframe-container {
      position: relative;
      width: 100%;
      background: #fff;
      border-radius: 0.5rem;
      box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
      padding: 1rem;
    }

    .iframe-wrapper {
      position: relative;
      width: 100%;
      height: 0;
      padding-bottom: 56.25%;
      background: #f3f4f6;
      overflow: hidden;
    }

    /* PC display */
    @media (min-width: 1024px) {
      .iframe-wrapper {
        height: 600px;
        padding-bottom: 0;
      }
    }

    /* Tablet display */
    @media (min-width: 768px) and (max-width: 1023px) {
      .iframe-wrapper {
        height: 500px;
        padding-bottom: 0;
      }
    }

    /* Mobile display */
    @media (max-width: 767px) {
      .iframe-wrapper {
        height: 300px;
        padding-bottom: 0;
      }
      .iframe-container {
        padding: 0.5rem;
      }
    }

    .iframe-wrapper iframe {
      position: absolute;
      top: 0;
      left: 0;
      width: 100%;
      height: 100%;
      border: none;
    }

    .iframe-controls {
      position: absolute;
      bottom: 1rem;
      right: 1rem;
      display: flex;
      gap: 0.5rem;
      z-index: 10;
    }

    .control-button {
      display: flex;
      align-items: center;
      justify-content: center;
      width: 2.5rem;
      height: 2.5rem;
      background: rgba(0, 0, 0, 0.6);
      border: 1px solid rgba(255, 255, 255, 0.1);
      border-radius: 0.375rem;
      cursor: pointer;
      transition: all 0.2s;
    }

    .control-button:hover {
      background: rgba(0, 0, 0, 0.8);
      transform: translateY(-1px);
    }

    .control-button svg {
      width: 1.25rem;
      height: 1.25rem;
      color: #ffffff;
    }

    /* Fullscreen styles */
    .iframe-container.fullscreen {
      position: fixed;
      top: 0;
      left: 0;
      width: 100vw;
      height: 100vh;
      z-index: 9999;
      padding: 0;
      margin: 0;
      border-radius: 0;
    }

    .iframe-container.fullscreen .iframe-wrapper {
      height: 100vh;
      padding-bottom: 0;
    }

    /* Mobile adjustments for controls */
    @media (max-width: 767px) {
      .iframe-controls {
        bottom: 0.5rem;
        right: 0.5rem;
      }

      .control-button {
        width: 2rem;
        height: 2rem;
      }

      .control-button svg {
        width: 1rem;
        height: 1rem;
      }
    }
