/* 全局样式 */
body {
    margin: 0;
    padding: 0;
    font-family: Arial, sans-serif;
    color: #333;
    overflow: hidden;
    background: #f0f0f0;
}

/* 背景 */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: url('default-background.jpg') center/cover no-repeat;
    z-index: -1;
}

.background video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    z-index: -1;
}
/* 网络时间警告提示 */
.network-time-warning {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(255, 193, 7, 0.95);
    color: #856404;
    padding: 12px 20px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    justify-content: space-between;
    z-index: 10000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 193, 7, 0.5);
    max-width: 80%;
    animation: slideInDown 0.5s ease;
}

@keyframes slideInDown {
    from {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.network-time-warning.fade-out {
    animation: fadeOutUp 0.5s ease forwards;
}

@keyframes fadeOutUp {
    from {
        transform: translate(-50%, 0);
        opacity: 1;
    }
    to {
        transform: translate(-50%, -100%);
        opacity: 0;
    }
}

.close-warning-btn {
    background: none;
    border: none;
    color: #856404;
    font-size: 20px;
    cursor: pointer;
    margin-left: 15px;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background-color 0.2s;
}

.close-warning-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
}
/* 毛玻璃效果 */
.container {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 15px;
    padding: 20px;
    max-width: 800px;
    margin: 50px auto;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
}

/* 顶部导航栏 */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    margin: 20px auto;
    max-width: 800px;
}

.logo, .title {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

.language-select select {
    padding: 5px;
    border-radius: 5px;
    border: 1px solid #ccc;
    background: rgba(255, 255, 255, 0.8);
    font-size: 14px;
}

/* 时间显示 */
.time-section {
    text-align: center;
    margin-bottom: 10px;
}

#currentTime {
    font-size: 18px;
    font-weight: bold;
    color: #333;
}

/* 搜索框 */
.search-bar {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
    width: 100%;
}

.search-bar input {
    box-sizing: border-box;
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 4px;
    outline: none;
    background: rgba(255, 255, 255, 0.8);
}

.search-bar .search-controls {
    display: flex;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.search-bar select {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.8);
    font-size: 14px;
    width: 25%;
}

.search-bar button {
    padding: 10px 15px;
    border: none;
    width: 25%;
    border-radius: 8px;
    background: linear-gradient(135deg, #0078d7, #00a2ff);
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.search-bar button:hover {
    background: linear-gradient(135deg, #00a2ff, #0078d7);
}

/* 联想词下拉框 - 调整位置覆盖搜索按钮区域 */
#suggestions {
    position: absolute;
    top: calc(100% - 50px); /* 上移覆盖搜索按钮区域 */
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
    max-height: 300px;
    overflow-y: auto;
}

#suggestions div {
    padding: 12px 15px;
    cursor: pointer;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s;
}

#suggestions div:hover {
    background: rgba(0, 120, 215, 0.1);
}

#suggestions div.translation-option {
    background: rgba(0, 120, 215, 0.15);
    font-weight: bold;
    color: #0078d7;
}

/* 提示信息 */
.tip {
    color: #666;
    font-size: 14px;
    margin-bottom: 20px;
}

/* 友情链接与产品系列 */
.links {
    text-align: center;
    margin-bottom: 20px;
}

.links a {
    color: #0078d7;
    text-decoration: none;
    font-size: 14px;
}

/* 公司版权信息 */
.copyright {
    text-align: center;
    color: #666;
    font-size: 14px;
}

/* 右下角功能按钮 */
.function-buttons {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
}

.function-buttons button {
    padding: 10px 15px;
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #6c757d, #868e96);
    color: white;
    cursor: pointer;
    transition: background 0.3s;
}

.function-buttons button:hover {
    background: linear-gradient(135deg, #868e96, #6c757d);
}

/* 设置面板 */
.settings-panel {
    position: fixed;
    bottom: 80px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 15px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    width: 300px;
    max-height: 70vh;
    overflow-y: auto;
    transform: translateY(20px);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease-out;
    z-index: 1000;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.settings-panel.active {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
}

.settings-panel h3 {
    margin: 0 0 15px 0;
    font-size: 18px;
    color: #333;
    padding-bottom: 8px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
}

.settings-panel label {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #333;
    margin: 10px 0;
    cursor: pointer;
}

.settings-panel input[type="checkbox"] {
    margin-right: 8px;
    width: 16px;
    height: 16px;
    accent-color: #0078d7;
}

.settings-panel select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    margin: 5px 0 15px;
    transition: border-color 0.3s;
}

.settings-panel select:focus {
    border-color: #0078d7;
    outline: none;
}

.settings-panel button {
    width: 100%;
    padding: 10px;
    margin: 5px 0;
    border: none;
    border-radius: 6px;
    background: linear-gradient(135deg, #0078d7, #00a2ff);
    color: white;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
}

.settings-panel button:hover {
    background: linear-gradient(135deg, #00a2ff, #0078d7);
    transform: translateY(-1px);
}

.settings-panel button.secondary {
    background: linear-gradient(135deg, #6c757d, #868e96);
}

.settings-panel button.secondary:hover {
    background: linear-gradient(135deg, #868e96, #6c757d);
}

.settings-panel button.danger {
    background: linear-gradient(135deg, #dc3545, #c82333);
}

.settings-panel button.danger:hover {
    background: linear-gradient(135deg, #c82333, #dc3545);
}

.settings-panel hr {
    border: none;
    height: 1px;
    background: rgba(0, 0, 0, 0.1);
    margin: 15px 0;
}

/* 搜索引擎管理样式 */
.search-engine-management {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.search-engine-management button {
    flex: 1;
}

.search-engine-list {
    margin-top: 10px;
}

.search-engine-list div {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.search-engine-list div:last-child {
    border-bottom: none;
}

.search-engine-list div button {
    padding: 2px 6px;
    width: auto;
    min-width: 40px;
    font-size: 11px;
    border-radius: 3px;
    background: #dc3545;
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.search-engine-list div button:hover {
    background: #c82333;
}

/* 添加搜索引擎表单样式 */
#addSearchEngineForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 10px;
    padding: 15px;
    background: rgba(0, 0, 0, 0.03);
    border-radius: 8px;
    border: 1px solid rgba(0, 0, 0, 0.1);
}

#addSearchEngineForm input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
}

#addSearchEngineForm input:focus {
    border-color: #0078d7;
    outline: none;
}

#addSearchEngineForm button {
    padding: 8px;
    background: linear-gradient(135deg, #28a745, #34ce57);
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

#addSearchEngineForm button:hover {
    background: linear-gradient(135deg, #34ce57, #28a745);
}

/* 滚动条样式 */
.settings-panel::-webkit-scrollbar {
    width: 6px;
}

.settings-panel::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.05);
    border-radius: 3px;
}

.settings-panel::-webkit-scrollbar-thumb {
    background: rgba(0, 0, 0, 0.2);
    border-radius: 3px;
}

.settings-panel::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 0, 0, 0.3);
}

/* 版本信息样式 */
.version-info {
    text-align: center;
    margin-top: 15px;
    font-size: 12px;
    color: #666;
}

/* 最小化对话框样式 */
.minimize-dialog {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.minimize-dialog-content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.minimize-dialog p {
    margin-bottom: 20px;
    font-size: 16px;
    text-align: center;
}

.minimize-dialog-buttons {
    display: flex;
    justify-content: space-between;
}

.minimize-dialog-buttons button {
    padding: 8px 15px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
}

#showThisTime {
    background: #0078d7;
    color: white;
}

#alwaysShow {
    background: #28a745;
    color: white;
}

#dontShowAgain {
    background: #6c757d;
    color: white;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        margin: 20px auto;
        padding: 15px;
    }
    
    .navbar {
        padding: 8px 15px;
    }
    
    .search-bar select, 
    .search-bar button {
        width: 35%;
    }
    
    .settings-panel {
        width: 280px;
        right: 10px;
    }
    
    .function-buttons {
        right: 10px;
        bottom: 10px;
    }
}