@import url('https://fonts.googleapis.com/css2?family=Roboto:wght@300;400;500;700&display=swap');

:root {
    --primary-color: #1E3A8A;
    --secondary-color: #DC2626;
    --background-color: #F3F4F6;
    --text-primary: #1F2937;
    --text-secondary: #6B7280;
    --white: #FFFFFF;
    --card-background: #FFFFFF;
    --border-color: #D1D5DB;
}

.dark-mode {
    --primary-color: #3B82F6;
    --secondary-color: #EF4444;
    --background-color: #1F2937;
    --text-primary: #F9FAFB;
    --text-secondary: #D1D5DB;
    --white: #374151;
    --card-background: #374151;
    --border-color: #4B5563;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Roboto', sans-serif;
    background-color: var(--background-color);
    color: var(--text-primary);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: background-color 0.3s, color 0.3s;
}

.top-header {
    background-color: var(--primary-color);
    color: var(--white);
    text-align: center;
    padding: 20px 0;
}

.top-header h1 {
    margin: 0;
    font-size: 28px;
    color: var(--white);
}

.main-content {
    display: flex;
    flex-grow: 1;
}

.sidebar {
    width: 200px;
    background-color: var(--primary-color);
    padding: 20px 0;
}

.sidebar ul {
    list-style-type: none;
}

.sidebar li {
    margin-bottom: 10px;
}

.sidebar a {
    display: flex;
    align-items: center;
    color: var(--white);
    text-decoration: none;
    padding: 10px 20px;
    transition: background-color 0.3s;
}

.sidebar a:hover, .sidebar a.active {
    background-color: rgba(255, 255, 255, 0.1);
}

.sidebar i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

main {
    flex-grow: 1;
    padding: 20px;
    overflow-y: auto;
}

h2 {
    color: var(--primary-color);
    font-size: 24px;
    margin-bottom: 20px;
}

.content {
    display: none;
}

.content.active {
    display: block;
}

.card {
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.speech-input {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.mic-container {
    margin-bottom: 20px;
}

.mic-button {
    background-color: var(--secondary-color);
    color: var(--white);
    border: none;
    border-radius: 50%;
    width: 80px;
    height: 80px;
    font-size: 24px;
    cursor: pointer;
    transition: transform 0.3s, box-shadow 0.3s;
}

.mic-button:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 8px rgba(220, 38, 38, 0.2);
}

#recognitionStatus {
    margin-bottom: 15px;
    color: var(--text-secondary);
}

textarea {
    width: 100%;
    height: 150px;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
    background-color: var(--card-background);
    color: var(--text-primary);
    margin-bottom: 15px;
}

.action-button {
    background-color: var(--primary-color);
    color: var(--white);
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.action-button:hover {
    background-color: #2563EB;
}

.language-selector {
    width: 100%;
    margin-top: 15px;
}

#languageSelector {
    width: 100%;
    padding: 5px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--card-background);
    color: var(--text-primary);
}

.history-container, .settings-panel {
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.history-item {
    border-bottom: 1px solid var(--border-color);
    padding: 10px 0;
}

.history-item p {
    margin-bottom: 5px;
}

.history-item small {
    color: var(--text-secondary);
}

.settings-panel label {
    display: block;
    margin-bottom: 10px;
}

.settings-panel input[type="checkbox"] {
    margin-right: 5px;
}

.page-footer {
    background-color: var(--primary-color);
    color: var(--white);
    padding: 15px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    justify-content: center;
    align-items: center;
}

.footer-content a {
    color: var(--white);
    text-decoration: none;
    margin: 0 10px;
}

.footer-content span {
    margin: 0 10px;
}

.footer-content p {
    margin: 0 10px;
}

@media (max-width: 768px) {
    .main-content {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        padding: 10px 0;
    }
    
    .sidebar ul {
        display: flex;
        justify-content: space-around;
    }
    
    .sidebar li {
        margin-bottom: 0;
    }

    .sidebar a {
        flex-direction: column;
        align-items: center;
        padding: 10px;
    }

    .sidebar i {
        margin-right: 0;
        margin-bottom: 5px;
    }

    .sidebar span {
        font-size: 12px;
    }
}

.speaking {
    background-color: var(--secondary-color);
}

/* 关于我们页面的附加样式 */
#about h3 {
    color: var(--primary-color);
    margin-top: 20px;
    margin-bottom: 10px;
}

#about ul {
    padding-left: 20px;
    margin-bottom: 15px;
}

#about li {
    margin-bottom: 10px;
}

#about strong {
    color: var(--primary-color);
}

#about p {
    line-height: 1.6;
    margin-bottom: 15px;
}