/* 共通基础样式 - 不受主题影响的样式 */
html, body {
    font-family: 'Segoe UI', Arial, sans-serif;
    margin: 0;
    padding: 0;
    min-height: 100vh;
}

body {
    display: flex;
    flex-direction: column;
    position: relative;
}

.container {
    flex: 1;
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

/* 头部样式 */
.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 50px;
    padding: 0 20px;
}

.header h1 {
    font-size: 32px;
    margin: 0;
}

/* 用户控件样式 */
.user-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

.welcome-message {
    font-size: 16px;
    color: #666;
}

.login-button, .logout-button, .admin-link {
    display: inline-block;
    padding: 8px 15px;
    border-radius: 4px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.3s;
}

.login-button {
    background-color: #4CAF50;
    color: white;
}

.login-button:hover {
    background-color: #45a049;
}

.logout-button {
    background-color: #f44336;
    color: white;
}

.logout-button:hover {
    background-color: #d32f2f;
}

.admin-link {
    background-color: #2196F3;
    color: white;
}

.admin-link:hover {
    background-color: #0b7dda;
}

/* 功能卡片 */
.features {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: 30px;
    margin-top: 50px;
    padding: 0 20px;
}

.feature-card {
    border-radius: 12px;
    padding: 30px;
    width: 300px;
    text-align: center;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    border: 1px solid #e53935;
}

.feature-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.feature-icon i {
    font-size: 36px;
}

.feature-title {
    font-size: 24px;
    margin-bottom: 15px;
}

.feature-description {
    font-size: 16px;
    line-height: 1.5;
}

/* 页脚样式 */
.footer {
    text-align: center;
    padding: 20px;
    margin-top: auto;
}

.footer p {
    margin: 0;
    font-size: 14px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
}

.modal-content {
    position: relative;
    margin: 10% auto;
    padding: 40px;
    width: 80%;
    max-width: 480px;
    border-radius: 16px;
    text-align: center;
    background: white;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

.modal-close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 20px;
    cursor: pointer;
    color: #999;
    transition: color 0.3s;
}

.modal-close:hover {
    color: #333;
}

.modal-title {
    font-size: 22px;
    margin-bottom: 16px;
    font-weight: 500;
    color: #333;
}

.modal-message {
    font-size: 14px;
    margin-bottom: 24px;
    color: #666;
    font-weight: 300;
}

.modal-button {
    background-color: #2196F3;
    color: white;
    padding: 10px 24px;
    font-size: 14px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 400;
}

.modal-button:hover {
    background-color: #1976D2;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 语音搜索页面 */
.search-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-top: 80px; /* 增加上边距，避免被顶部控件遮挡 */
    margin-bottom: 30px;
    position: relative;
}

.voice-section {
    margin-bottom: 30px;
    text-align: center;
    width: 100%;
}

.voice-button {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 3px solid #4CAF50;
    cursor: pointer;
    margin: 0 auto;
    position: relative;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #e8f5e9;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.voice-button i {
    font-size: 50px;
    margin-bottom: 10px;
    color: #4CAF50;
}

.voice-button .button-text {
    font-size: 18px;
    font-weight: bold;
    color: #4CAF50;
    margin-top: 5px;
}

.search-controls {
    width: 100%;
    max-width: 500px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 20px;
}

.search-input-container {
    position: relative;
    width: 100%;
    margin-right: 8px;
    display: flex;
    align-items: center;
}

.search-box {
    width: 100%;
    padding: 12px;
    font-size: 14px;
    border-radius: 4px;
}

.history-toggle {
    position: absolute;
    right: 8px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.search-button {
    padding: 12px 20px;
    font-size: 14px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

/* 历史记录面板 */
.history-panel {
    width: 100%;
    max-width: 500px;
    margin: 10px auto;
    border-radius: 8px;
    overflow: hidden;
    position: absolute;
    top: 100%;
    z-index: 10;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 15px;
}

.history-header h3 {
    margin: 0;
    font-size: 16px;
}

.clear-history {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
    border-radius: 4px;
    transition: all 0.3s ease;
}

.history-list {
    max-height: 200px;
    overflow-y: auto;
}

.history-item {
    padding: 10px 15px;
    display: flex;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
}

.status-text {
    margin-top: 10px;
    text-align: center;
    font-size: 14px;
}

.results {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.result-item {
    padding: 15px;
    margin-bottom: 10px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* 顶部控件样式 */
.top-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    width: 100%;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 100;
    background-color: rgba(255, 255, 255, 0.9);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.back-button {
    padding: 10px 20px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* 主题切换开关样式 */
.theme-switch-wrapper {
    position: fixed;
    top: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    z-index: 100;
}

/* 动画效果 */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

/* 响应式设计 */
@media (max-width: 768px) {
    .features {
        flex-direction: column;
        align-items: center;
    }

    .feature-card {
        width: 90%;
        margin-bottom: 20px;
    }

    .voice-button {
        width: 120px;
        height: 120px;
    }

    .voice-button i {
        font-size: 30px;
    }

    .search-controls {
        flex-direction: column;
    }

    .search-input-container {
        width: 100%;
        margin-bottom: 10px;
    }

    .search-button {
        width: 100%;
    }
}