/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f7fa;
}

/* 容器样式 */
.container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* 认证页面样式 */
.auth-container {
    background: white;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    max-width: 1200px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 600px;
}

.logo-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.logo {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.logo i {
    font-size: 3rem;
}

.logo h1 {
    font-size: 2.5rem;
    font-weight: 700;
}

.tagline {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.features {
    display: grid;
    gap: 30px;
}

.feature {
    text-align: center;
}

.feature i {
    font-size: 2rem;
    margin-bottom: 15px;
    opacity: 0.8;
}

.feature h3 {
    font-size: 1.2rem;
    margin-bottom: 10px;
}

.feature p {
    font-size: 0.9rem;
    opacity: 0.8;
}

.auth-forms {
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-container {
    width: 100%;
}

.form-container h2 {
    text-align: center;
    margin-bottom: 30px;
    color: #333;
    font-size: 1.8rem;
}

.form-container h2 i {
    margin-right: 10px;
    color: #667eea;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
}

.input-group i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e1e5e9;
    border-radius: 10px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-group input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    justify-content: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    padding: 15px;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.875rem;
}

.switch-form {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.switch-form a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

.switch-form a:hover {
    text-decoration: underline;
}

/* 仪表板样式 */
.dashboard {
    display: flex;
    min-height: 100vh;
    background: #f5f7fa;
}

.sidebar {
    width: 280px;
    background: white;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 1000;
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid #e9ecef;
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
    color: #667eea;
}

.sidebar-header .logo i {
    font-size: 2rem;
}

.sidebar-header .logo h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
}

.nav-menu {
    flex: 1;
    padding: 20px 0;
    list-style: none;
}

.nav-item {
    margin-bottom: 5px;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    color: #666;
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
}

.nav-item a:hover {
    background: #f8f9fa;
    color: #667eea;
}

.nav-item.active a {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.nav-item.active a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #667eea;
}

.nav-item i {
    font-size: 1.2rem;
    width: 20px;
}

.coming-soon {
    background: #ffc107;
    color: #856404;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: auto;
}

.admin-section {
    border-top: 1px solid #e9ecef;
    margin-top: 10px;
    padding-top: 10px;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid #e9ecef;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #666;
}

.user-info i {
    font-size: 1.5rem;
    color: #667eea;
}

.admin-badge {
    background: #28a745;
    color: white;
    font-size: 0.7rem;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 5px;
}

.logout-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #dc3545;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
}

.logout-btn:hover {
    color: #c82333;
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 30px;
    overflow-y: auto;
}

.content-header {
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 20px;
}

.content-header h1 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 5px;
}

.content-header h1 i {
    color: #667eea;
    margin-right: 10px;
}

.subtitle {
    color: #666;
    font-size: 1.1rem;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid #e9ecef;
}

.card h3 {
    color: #333;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card h3 i {
    color: #667eea;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

/* 仪表板网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 25px;
}

.quick-actions .action-buttons {
    display: grid;
    gap: 15px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
    background: #f8f9fa;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    text-decoration: none;
    color: #333;
    transition: all 0.3s ease;
}

.action-btn:hover {
    background: #667eea;
    color: white;
    border-color: #667eea;
    transform: translateY(-2px);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

.stat-item {
    text-align: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: #667eea;
    margin-bottom: 5px;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

.feature-list {
    display: grid;
    gap: 15px;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.feature-item i {
    color: #667eea;
    font-size: 1.5rem;
    margin-top: 5px;
}

.feature-item h4 {
    margin-bottom: 5px;
    color: #333;
}

.feature-item p {
    color: #666;
    font-size: 0.9rem;
}

.activity-list {
    display: grid;
    gap: 15px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.activity-item i {
    color: #28a745;
    font-size: 1.2rem;
}

.activity-item .time {
    color: #999;
    font-size: 0.8rem;
    margin-top: 5px;
}

/* 时文阅读样式 */
.reading-container {
    display: grid;
    gap: 30px;
}

.input-section .textarea-container {
    position: relative;
}

.input-section textarea {
    width: 100%;
    min-height: 200px;
    padding: 20px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    font-family: inherit;
}

.input-section textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.input-tools {
    display: flex;
    justify-content: space-between;
    margin-top: 15px;
}

.result-section {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.generated-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #333;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    margin-bottom: 15px;
}

.title-tools {
    display: flex;
    gap: 10px;
}

.content-tools {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 10px;
}

.style-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
}

.style-controls label {
    font-weight: 600;
    color: #333;
}

.style-controls select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

.article-content {
    padding: 25px;
    background: white;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    line-height: 1.8;
    font-size: 16px;
}

.highlighted-word {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.highlighted-word:hover {
    transform: scale(1.05);
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.keywords-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.keyword-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.keyword-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.keyword-word {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.keyword-phonetic {
    color: #667eea;
    font-style: italic;
    margin-bottom: 8px;
}

.keyword-translation {
    color: #666;
    font-size: 0.9rem;
}

/* 管理员后台样式 */
.admin-container {
    display: grid;
    gap: 30px;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid #e9ecef;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-size: 0.9rem;
}

.admin-nav {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.nav-tabs {
    display: flex;
    border-bottom: 1px solid #e9ecef;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:first-child {
    border-radius: 12px 0 0 0;
}

.tab-btn:last-child {
    border-radius: 0 12px 0 0;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #f8f9fa;
    color: #333;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.table-container {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.users-table th,
.users-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.users-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.users-table tr:hover {
    background: #f8f9fa;
}

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

.user-info i {
    color: #667eea;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin {
    background: #28a745;
    color: white;
}

.badge-user {
    background: #6c757d;
    color: white;
}

.badge-active {
    background: #28a745;
    color: white;
}

.badge-success {
    background: #28a745;
    color: white;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.setting-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
}

.setting-item h4 {
    margin-bottom: 10px;
    color: #333;
}

.setting-item p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.coming-soon-text {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    padding: 40px;
}

.coming-soon-text i {
    color: #ffc107;
    margin-right: 10px;
}

/* 个人资料样式 */
.profile-container {
    display: grid;
    gap: 30px;
}

.profile-basic {
    grid-column: 1 / -1;
}

.profile-avatar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

.avatar-info h4 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #333;
}

.avatar-info p {
    color: #666;
    margin-bottom: 10px;
}

.profile-form {
    display: grid;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[readonly] {
    background: #f8f9fa;
    color: #666;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

.learning-stats {
    grid-column: 1 / -1;
}

.preferences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.preference-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preference-header i {
    color: #667eea;
}

.preference-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.security-items {
    display: grid;
    gap: 20px;
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.security-info h4 {
    margin-bottom: 5px;
    color: #333;
}

.security-info p {
    color: #666;
    font-size: 0.9rem;
}

/* 文章列表样式 */
.articles-container {
    display: grid;
    gap: 30px;
}

.articles-stats {
    display: flex;
    gap: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.articles-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
}

.articles-stats .stat-item i {
    color: #667eea;
}

.articles-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.filter-options select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.article-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.article-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid #e9ecef;
}

.article-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #666;
    font-size: 0.9rem;
}

.article-meta i {
    color: #667eea;
}

.article-content {
    padding: 15px 20px;
}

.article-preview {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

.article-keywords {
    padding: 15px 20px;
    border-top: 1px solid #f8f9fa;
}

.keyword-tag {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 8px;
    margin-bottom: 5px;
}

.keyword-more {
    display: inline-block;
    background: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.article-actions {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.empty-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #333;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
    margin-bottom: 30px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal h3 {
    margin-bottom: 20px;
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.word-details {
    text-align: center;
    padding: 20px;
}

.word-details h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
}

.phonetic {
    font-size: 1.2rem;
    color: #667eea;
    font-style: italic;
    margin-bottom: 15px;
}

.translation {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 25px;
}

.word-actions {
    display: flex;
    justify-content: center;
}

.article-detail-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.article-detail-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.article-detail-meta {
    color: #666;
}

.article-detail-content {
    margin-bottom: 30px;
}

.content-section {
    margin-bottom: 30px;
}

.content-section h4 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-section h4 i {
    color: #667eea;
}

.formatted-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.keywords-section h4 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.keywords-section h4 i {
    color: #667eea;
}

.keywords-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.article-detail-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.message.show {
    transform: translateX(0);
}

.message.success {
    background: #28a745;
}

.message.error {
    background: #dc3545;
}

.message.info {
    background: #17a2b8;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .logo-section {
        padding: 40px 30px;
    }
    
    .auth-forms {
        padding: 40px 30px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .tab-btn:first-child {
        border-radius: 12px 12px 0 0;
    }
    
    .tab-btn:last-child {
        border-radius: 0 0 12px 12px;
    }
    
    .articles-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .preferences-grid {
        grid-template-columns: 1fr;
    }
    
    .preference-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .article-detail-actions {
        flex-direction: column;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}

/* 颜色选择器样式 */
.color-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 5px;
}

.color-option {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s ease;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.selected {
    border-color: #333;
    transform: scale(1.1);
    box-shadow: 0 0 5px rgba(0, 0, 0, 0.3);
}

/* 数值调整输入框样式 */
.input-number {
    width: 80px;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.input-number:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.2);
}

/* 改进的单词卡片样式 */
.word-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    margin-top: 20px;
}

.word-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    padding: 15px;
    transition: all 0.3s ease;
    border: 1px solid #e9ecef;
}

.word-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.word-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.word-phonetic {
    font-size: 0.9rem;
    color: #667eea;
    font-style: italic;
    margin-bottom: 5px;
}

.word-translation {
    font-size: 0.95rem;
    color: #666;
    margin-bottom: 10px;
}

.word-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

/* 高亮单词样式 */
.annotated-word {
    position: relative;
    cursor: pointer;
    border-bottom: 1px dotted #ccc;
    transition: all 0.2s ease;
}

.annotated-word:hover {
    background-color: rgba(102, 126, 234, 0.1);
}

.annotated-word.highlighted {
    background-color: rgba(255, 193, 7, 0.3);
    border-bottom: 1px solid #ffc107;
}

.keywords-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

.keyword-item {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.keyword-item:hover {
    background: white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
}

.keyword-word {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 5px;
}

.keyword-phonetic {
    color: #667eea;
    font-style: italic;
    margin-bottom: 8px;
}

.keyword-translation {
    color: #666;
    font-size: 0.9rem;
}

/* 管理员后台样式 */
.admin-container {
    display: grid;
    gap: 30px;
}

.stats-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    display: flex;
    align-items: center;
    gap: 20px;
    border: 1px solid #e9ecef;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    font-size: 1.5rem;
}

.stat-info h3 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 5px;
}

.stat-info p {
    color: #666;
    font-size: 0.9rem;
}

.admin-nav {
    background: white;
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.nav-tabs {
    display: flex;
    border-bottom: 1px solid #e9ecef;
}

.tab-btn {
    flex: 1;
    padding: 15px 20px;
    border: none;
    background: none;
    cursor: pointer;
    font-size: 1rem;
    color: #666;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.tab-btn:first-child {
    border-radius: 12px 0 0 0;
}

.tab-btn:last-child {
    border-radius: 0 12px 0 0;
}

.tab-btn.active {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.tab-btn:hover:not(.active) {
    background: #f8f9fa;
    color: #333;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.table-container {
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

.users-table th,
.users-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #e9ecef;
}

.users-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
}

.users-table tr:hover {
    background: #f8f9fa;
}

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

.user-info i {
    color: #667eea;
}

.badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
}

.badge-admin {
    background: #28a745;
    color: white;
}

.badge-user {
    background: #6c757d;
    color: white;
}

.badge-active {
    background: #28a745;
    color: white;
}

.badge-success {
    background: #28a745;
    color: white;
}

.action-buttons {
    display: flex;
    gap: 5px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.setting-item {
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
    text-align: center;
}

.setting-item h4 {
    margin-bottom: 10px;
    color: #333;
}

.setting-item p {
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.coming-soon-text {
    text-align: center;
    color: #666;
    font-size: 1.1rem;
    padding: 40px;
}

.coming-soon-text i {
    color: #ffc107;
    margin-right: 10px;
}

/* 个人资料样式 */
.profile-container {
    display: grid;
    gap: 30px;
}

.profile-basic {
    grid-column: 1 / -1;
}

.profile-avatar {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2.5rem;
}

.avatar-info h4 {
    font-size: 1.5rem;
    margin-bottom: 5px;
    color: #333;
}

.avatar-info p {
    color: #666;
    margin-bottom: 10px;
}

.profile-form {
    display: grid;
    gap: 20px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 600;
    color: #333;
}

.form-group input,
.form-group select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: #667eea;
}

.form-group input[readonly] {
    background: #f8f9fa;
    color: #666;
}

.form-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-start;
}

.learning-stats {
    grid-column: 1 / -1;
}

.preferences-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

.preference-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.preference-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.preference-header i {
    color: #667eea;
}

.preference-select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: white;
}

.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 24px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.security-items {
    display: grid;
    gap: 20px;
}

.security-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 10px;
}

.security-info h4 {
    margin-bottom: 5px;
    color: #333;
}

.security-info p {
    color: #666;
    font-size: 0.9rem;
}

/* 文章列表样式 */
.articles-container {
    display: grid;
    gap: 30px;
}

.articles-stats {
    display: flex;
    gap: 30px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.articles-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: #666;
}

.articles-stats .stat-item i {
    color: #667eea;
}

.articles-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 400px;
}

.search-box i {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    color: #999;
}

.search-box input {
    width: 100%;
    padding: 12px 15px 12px 45px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    font-size: 1rem;
}

.search-box input:focus {
    outline: none;
    border-color: #667eea;
}

.filter-options select {
    padding: 12px 15px;
    border: 2px solid #e9ecef;
    border-radius: 8px;
    background: white;
    font-size: 1rem;
}

.articles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 25px;
}

.article-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
    overflow: hidden;
    transition: all 0.3s ease;
}

.article-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.article-header {
    padding: 20px 20px 15px;
    border-bottom: 1px solid #e9ecef;
}

.article-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
    line-height: 1.4;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    color: #666;
    font-size: 0.9rem;
}

.article-meta i {
    color: #667eea;
}

.article-content {
    padding: 15px 20px;
}

.article-preview {
    color: #666;
    line-height: 1.6;
    font-size: 0.95rem;
}

.article-keywords {
    padding: 15px 20px;
    border-top: 1px solid #f8f9fa;
}

.keyword-tag {
    display: inline-block;
    background: #667eea;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-right: 8px;
    margin-bottom: 5px;
}

.keyword-more {
    display: inline-block;
    background: #6c757d;
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.article-actions {
    padding: 15px 20px;
    background: #f8f9fa;
    display: flex;
    gap: 10px;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid #e9ecef;
}

.empty-icon {
    font-size: 4rem;
    color: #ddd;
    margin-bottom: 20px;
}

.empty-state h3 {
    color: #333;
    margin-bottom: 10px;
}

.empty-state p {
    color: #666;
    margin-bottom: 30px;
}

/* 模态框样式 */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    animation: slideIn 0.3s ease;
}

.modal-large {
    max-width: 800px;
}

@keyframes slideIn {
    from { transform: translateY(-50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    color: #999;
    transition: color 0.3s ease;
}

.close:hover {
    color: #333;
}

.modal h3 {
    margin-bottom: 20px;
    color: #333;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.word-details {
    text-align: center;
    padding: 20px;
}

.word-details h3 {
    font-size: 2rem;
    color: #333;
    margin-bottom: 15px;
}

.phonetic {
    font-size: 1.2rem;
    color: #667eea;
    font-style: italic;
    margin-bottom: 15px;
}

.translation {
    font-size: 1.1rem;
    color: #666;
    margin-bottom: 25px;
}

.word-actions {
    display: flex;
    justify-content: center;
}

.article-detail-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e9ecef;
}

.article-detail-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.article-detail-meta {
    color: #666;
}

.article-detail-content {
    margin-bottom: 30px;
}

.content-section {
    margin-bottom: 30px;
}

.content-section h4 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.content-section h4 i {
    color: #667eea;
}

.formatted-content {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
    padding: 20px;
    background: #f8f9fa;
    border-radius: 8px;
}

.keywords-section h4 {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.keywords-section h4 i {
    color: #667eea;
}

.keywords-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
}

.article-detail-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
}

/* 消息提示样式 */
.message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 600;
    z-index: 3000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
}

.message.show {
    transform: translateX(0);
}

.message.success {
    background: #28a745;
}

.message.error {
    background: #dc3545;
}

.message.info {
    background: #17a2b8;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .auth-container {
        grid-template-columns: 1fr;
        max-width: 500px;
    }
    
    .logo-section {
        padding: 40px 30px;
    }
    
    .auth-forms {
        padding: 40px 30px;
    }
    
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.3s ease;
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
        padding: 20px;
    }
    
    .content-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .nav-tabs {
        flex-direction: column;
    }
    
    .tab-btn:first-child {
        border-radius: 12px 12px 0 0;
    }
    
    .tab-btn:last-child {
        border-radius: 0 0 12px 12px;
    }
    
    .articles-filters {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .articles-grid {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 10% auto;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .stats-overview {
        grid-template-columns: 1fr;
    }
    
    .stat-card {
        flex-direction: column;
        text-align: center;
    }
    
    .preferences-grid {
        grid-template-columns: 1fr;
    }
    
    .preference-item {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .article-detail-actions {
        flex-direction: column;
    }
    
    .modal-actions {
        flex-direction: column;
    }
}