/* 全局样式 */
:root {
    --primary-color: #1e88e5;
    --primary-dark: #0d47a1;
    --text-primary: #333;
    --text-secondary: #666;
    --background-light: #f5f7fa;
    --border-color: #e0e0e0;
    --shadow-color: rgba(0, 0, 0, 0.08);
    --transition-speed: 0.3s;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Noto Sans SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: var(--background-light);
    color: var(--text-primary);
    line-height: 1.8;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    font-size: 16px;
    overflow-x: hidden;
}

/* 页眉 */
header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 1rem 2rem;
    text-align: center;
    box-shadow: 0 4px 12px var(--shadow-color);
}

header h1 {
    margin-bottom: 0.75rem;
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: 2px;
}

.mode-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
    position: relative;
}

.mode-selector button {
    padding: 0.5rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    flex: 1;
}

.mode-selector button:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.mode-selector button.active {
    background-color: white;
    color: var(--primary-color);
    font-weight: 600;
}

/* 主要内容 */
main {
    flex: 1;
    padding: 1.5rem 2rem 1rem;
}

.main-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    gap: 2rem;
    height: calc(100vh - 130px);
    min-height: 500px;
}

/* 国家列表 */
.country-list-container {
    flex: 0 0 300px;
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: 0 4px 12px var(--shadow-color);
    height: 100%;
    transition: all var(--transition-speed) ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    min-width: 300px;
    width: 300px;
}

.country-list-container h2 {
    margin-bottom: 1.5rem;
    color: var(--primary-color);
    font-size: 1.5rem;
    text-align: center;
}

.search-box {
    margin-bottom: 1.5rem;
}

.search-box input {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all var(--transition-speed);
}

.search-box input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

#country-list {
    list-style: none;
    flex: 1;
    overflow-y: auto;
    padding-right: 0.5rem;
    margin-right: -0.5rem;
    max-height: calc(100vh - 200px);
}

#country-list::-webkit-scrollbar {
    width: 6px;
}

#country-list::-webkit-scrollbar-track {
    background: var(--background-light);
    border-radius: 3px;
}

#country-list::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 3px;
}

/* 大洲标题样式 */
#country-list li.continent-header {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-left: 0;
}

#country-list li.continent-header:hover {
    transform: translateX(0);
    opacity: 0.9;
}

#country-list li.continent-header::after {
    content: '▼';
    position: absolute;
    right: 1.2rem;
    transition: transform 0.3s;
}

#country-list li.continent-header.collapsed::after {
    transform: rotate(-90deg);
}

/* 世界选项特殊样式 */
#country-list li.continent-header:first-child::after {
    display: none !important;
    content: none !important;
}

/* 国家列表项样式 */
#country-list li:not(.continent-header) {
    padding: 1.2rem;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: center;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    font-size: 1.1rem;
    font-weight: 500;
    margin-left: 1rem;
}

#country-list li:not(.continent-header).hidden {
    display: none;
}

#country-list li:not(.continent-header):hover {
    background-color: #e3f2fd;
    transform: translateX(5px);
    color: var(--primary-color);
}

#country-list li:not(.continent-header).active {
    background: linear-gradient(135deg, #c5dcf7, #90c1f9);
    color: #333;
    font-weight: 600;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(144, 193, 249, 0.3);
    border-left: 4px solid #6ba4e9;
}

/* 内容区域 */
.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.content-area::-webkit-scrollbar {
    width: 8px;
}

.content-area::-webkit-scrollbar-track {
    background: var(--background-light);
}

.content-area::-webkit-scrollbar-thumb {
    background: var(--primary-color);
    border-radius: 4px;
}

.mode-container {
    display: block;
    width: 100%;
    height: 100%;
}

.mode-container.hidden {
    display: none !important;
}

/* 确保游戏模式正确显示 */
#game-mode {
    display: block;
    width: 100%;
    height: 100%;
    background-color: #fff;
}

/* 国家详情 */
.country-header {
    position: relative;
    padding-top: 0.25rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.country-name {
    margin-bottom: 1rem;
}

.country-name h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.country-name h3 {
    font-size: 1.5rem;
    color: var(--text-secondary);
}

.country-etymology {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.25rem;
    margin-bottom: 0.5rem;
    font-style: normal;
    line-height: 1.4;
}

.country-etymology::before {
    content: "(";
}

.country-etymology::after {
    content: ")";
}

/* 国旗和国徽容器 */
.flag-emblem-container {
    display: flex;
    justify-content: center;
    gap: 3rem;
    margin-bottom: 2rem;
}

.flag-container, .emblem-container {
    flex: 1;
    max-width: 300px;
    text-align: center;
}

.flag-container .image-wrapper, .emblem-container .image-wrapper {
    height: 200px;
    margin-bottom: 0.3rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
}

.flag-container .image-wrapper img, .emblem-container .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    background-color: var(--background-light);
    padding: 0.5rem;
}

.flag-container h3, .emblem-container h3 {
    margin-bottom: 0.3rem;
    font-size: 1.2rem;
}

/* 国旗/国徽含义按钮 */
.meaning-btn {
    display: inline-block;
    padding: 0.3rem 0.8rem;
    background-color: var(--background-light);
    color: var(--primary-color);
    border: 1px solid var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
    margin-top: 0.2rem;
}

.meaning-btn:hover {
    background-color: var(--primary-color);
    color: white;
    transform: translateY(-2px);
}

/* 国旗/国徽含义弹窗 */
.meaning-modal {
    display: none;
    position: fixed;
    z-index: 1100;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.7);
}

.meaning-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.meaning-content {
    position: relative;
    background-color: #fefefe;
    padding: 2rem;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0,0,0,0.2);
}

.meaning-content h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.meaning-text {
    margin: 1rem 0;
    line-height: 1.6;
    color: var(--text-primary);
    text-align: justify;
}

.meaning-text h4 {
    color: var(--primary-color);
    margin-bottom: 0.75rem;
    font-size: 1.2rem;
}

.meaning-paragraph {
    margin-bottom: 1rem;
    line-height: 1.7;
}

.meaning-content .close-modal {
    position: absolute;
    right: 15px;
    top: 15px;
}

.no-meaning {
    font-style: italic;
    color: var(--text-secondary);
    text-align: center;
}

/* 国家信息样式 */
.country-info {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.info-section {
    margin-bottom: 2rem;
    background-color: var(--background-light);
    border-radius: 12px;
    padding: 1.5rem;
}

.info-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

.info-item {
    display: flex;
    align-items: center;
    padding: 0.7rem 1rem;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: transform var(--transition-speed);
}

.info-item:hover {
    transform: translateY(-2px);
}

.info-label {
    font-weight: 600;
    color: var(--primary-color);
    min-width: 100px;
    padding-right: 1rem;
    position: relative;
    font-size: 1.15rem;
}

.info-value {
    flex: 1;
    color: var(--text-primary);
    font-size: 1.15rem;
    line-height: 1.6;
}

/* 媒体播放器 */
.media-section {
    margin: 1.5rem 0;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.media-section h3 {
    font-size: 1.5rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.media-player {
    margin-bottom: 1.5rem;
}

.media-player video,
.media-player audio {
    width: 100%;
    border-radius: 8px;
    background: var(--background-light);
}

/* 地图显示 */
.maps-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 1.5rem 0;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.map-item {
    position: relative;
}

.map-item h3 {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.map-item .image-wrapper {
    min-height: 200px;
    margin-bottom: 0.3rem;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 4px 12px var(--shadow-color);
    position: relative;
}

.map-item .image-wrapper img {
    width: 100%;
    height: auto;
    object-fit: contain;
    background-color: var(--background-light);
    padding: 0.5rem;
}

.map-zoom {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background-color: rgba(255, 255, 255, 0.8);
    padding: 5px;
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.map-zoom:hover {
    transform: scale(1.1);
}

/* 社交互动 */
.social-interaction {
    margin-top: 1.5rem;
    margin-bottom: 1rem;
    text-align: center;
}

.interaction-panel {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.interaction-panel button {
    padding: 1rem 2rem;
    border: none;
    border-radius: 8px;
    background-color: var(--background-light);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all var(--transition-speed);
    display: inline-flex;
    align-items: center;
    gap: 0.8rem;
    font-size: 1.1rem;
}

.interaction-panel button:hover {
    background-color: #e3f2fd;
    color: var(--primary-color);
    transform: translateY(-2px);
}

.interaction-panel button.active {
    background-color: var(--primary-color);
    color: white;
}

.like-btn, .favorite-btn {
    display: inline-flex;
    margin-right: 1rem;
}

.comments-section {
    margin-top: 1.5rem;
    max-width: 800px;
    margin: 0 auto;
}

.comments-section h3 {
    font-size: 1.5rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.comment-input {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
}

.comment-input textarea {
    width: 100%;
    min-height: 80px;
    padding: 0.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

.submit-comment {
    padding: 0.5rem 1.5rem;
    border-radius: 20px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    transition: background-color 0.3s;
    align-self: flex-start;
}

.submit-comment:hover {
    background-color: var(--primary-dark);
}

.comments-list {
    max-height: 400px;
    overflow-y: auto;
}

.comment-item {
    padding: 1.5rem;
    background: var(--background-light);
    border-radius: 8px;
    margin-bottom: 1rem;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 0.8rem;
}

.comment-content {
    color: var(--text-primary);
    line-height: 1.6;
    text-align: left;
}

/* 地图预览模态框 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    z-index: 9999;
    overflow: hidden;
}

.modal.show {
    display: flex !important;
    justify-content: center;
    align-items: center;
}

.modal .modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
    margin: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    background: transparent;
}

.modal #modal-image {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
}

.modal #modal-image:active {
    cursor: grabbing;
}

.modal .close-modal {
    position: absolute;
    right: 20px;
    top: 20px;
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
    transition: all 0.3s ease;
}

.modal .close-modal:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.modal .zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 10000;
}

.modal .zoom-btn {
    width: 40px;
    height: 40px;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid #fff;
    border-radius: 50%;
    color: #fff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.3s ease;
}

.modal .zoom-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.map-image {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.map-image:hover {
    transform: scale(1.05);
}

.map-zoom {
    cursor: pointer;
    transition: transform 0.3s ease;
}

.map-zoom:hover {
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .modal .modal-content {
        max-width: 95%;
    }

    .modal .close-modal,
    .modal .zoom-btn {
        width: 36px;
        height: 36px;
        font-size: 14px;
    }

    .modal .close-modal {
        right: 10px;
        top: 10px;
    }

    .modal .zoom-controls {
        bottom: 10px;
        right: 10px;
        gap: 8px;
    }
}

#question-detail-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow: hidden;
}

#question-detail-modal.show {
    display: flex;
    align-items: center;
    justify-content: center;
}

#question-detail-modal .modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    padding: 2.5rem 2rem 2rem;
    position: relative;
    overflow-y: auto;
    margin: 20px auto;
}

#question-detail-modal .close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: white;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#question-detail-modal .close-modal:hover {
    background-color: #f5f5f5;
    transform: scale(1.05);
}

.question-detail-container {
    flex: 1;
    overflow-y: auto;
    padding-right: 15px;
}

.question-detail-container::-webkit-scrollbar {
    width: 8px;
}

.question-detail-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.question-detail-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.question-detail-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.question-detail-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.answers-section {
    margin-top: 2rem;
    padding-bottom: 2rem;
}

@media (max-width: 768px) {
    #question-detail-modal .modal-content {
        width: 95%;
        height: 95vh;
        padding: 50px 20px 20px;
        margin: 10px;
    }

    #question-detail-modal .close-modal {
        top: 15px;
        right: 15px;
        width: 32px;
        height: 32px;
    }
}

/* 缩放控制按钮样式 */
.zoom-controls {
    position: absolute;
    bottom: 20px;
    right: 20px;
    display: flex;
    gap: 10px;
    z-index: 1010;
}

.zoom-btn {
    width: 40px;
    height: 40px;
    border: none;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

.zoom-btn:hover {
    background: rgba(0, 0, 0, 0.8);
    transform: scale(1.1);
}

.zoom-btn i {
    font-size: 18px;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .modal-content {
        padding: 15px;
    }

    .zoom-controls {
        bottom: 15px;
        right: 15px;
    }

    .zoom-btn {
        width: 36px;
        height: 36px;
    }
}

#adminLoginForm {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 20px;
}

#adminLoginForm input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

#adminLoginForm button {
    padding: 8px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* 管理员面板样式 */
.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: white;
    padding: 2rem;
    z-index: 1000;
    overflow-y: auto;
    transform: none;
    margin-right: 0;
    box-shadow: none;
    border-radius: 0;
}

.admin-panel h2 {
    color: var(--primary-color);
    margin-bottom: 2rem;
    font-size: 1.8rem;
    text-align: center;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-color);
}

.admin-controls {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 2rem;
}

.admin-controls button {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    min-width: 180px;
}

.admin-controls button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

#adminEditArea {
    margin-top: 2rem;
    padding: 2rem;
    background: var(--background-light);
    border-radius: 12px;
}

#adminEditArea h3 {
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    font-size: 1.4rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

#countrySelect {
    width: 100%;
    padding: 1rem;
    margin-bottom: 1.5rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.1rem;
    background-color: white;
}

#countrySelect:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

#adminEditArea button {
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 1.1rem;
    margin: 1rem 0;
}

#adminEditArea button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 国家信息编辑表单样式 */
.country-edit-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    margin-top: 1.5rem;
    max-width: 100%;
}

.edit-section {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 1.5rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.edit-section h4 {
    color: var(--primary-color);
    margin-top: 0;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

.form-row {
    display: flex;
    gap: 1.5rem;
    margin-bottom: 1rem;
}

.form-row .form-group {
    flex: 1;
}

.form-group {
    margin-bottom: 1rem;
}

.preview-container {
    display: flex;
    justify-content: center;
    margin-top: 0.5rem;
    border: 1px dashed var(--border-color);
    padding: 1rem;
    border-radius: 8px;
    background-color: #ffffff;
}

.preview-container img {
    max-height: 150px;
    object-fit: contain;
}

.preview-container audio,
.preview-container video {
    width: 100%;
    max-width: 500px;
}

@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* 新闻编辑表单样式 */
.news-form {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.news-form .form-group {
    margin-bottom: 1.5rem;
}

.news-form .media-upload-area {
    border: 2px dashed var(--border-color);
    padding: 2rem;
    text-align: center;
    border-radius: 8px;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.news-form .media-upload-area:hover {
    border-color: var(--primary-color);
    background: rgba(30, 136, 229, 0.05);
}

.news-form .media-preview {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.news-form .media-item {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.news-form .media-item img {
    width: 100%;
    height: 150px;
    object-fit: cover;
}

.news-form .media-item .remove-media {
    position: absolute;
    top: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-form .media-item .remove-media:hover {
    background: rgba(0, 0, 0, 0.8);
}

/* 保存按钮样式 */
.save-button {
    grid-column: 1 / -1;
    padding: 1rem 2rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 2rem;
}

.save-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 新闻列表样式 */
.news-list {
    display: grid;
    gap: 20px;
    padding: 20px;
}

.news-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.news-cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 20px;
}

.news-category {
    display: inline-block;
    padding: 4px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 10px;
}

.news-content h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.news-text {
    margin-bottom: 15px;
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
}

.news-text img,
.news-text video,
.news-text audio {
    max-width: 100%;
    margin: 10px 0;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

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

.news-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.news-actions button:first-child {
    background: #4CAF50;
    color: white;
}

.news-actions button:last-child {
    background: #f44336;
    color: white;
}

.news-actions button:hover {
    opacity: 0.9;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .admin-panel {
        width: 95%;
        padding: 1.5rem;
        right: 1rem;
    }

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

    #countryEditForm, .news-form {
        grid-template-columns: 1fr;
        padding: 1.5rem;
    }

    .news-list {
        grid-template-columns: 1fr;
    }
}

/* 测试模式 */
.test-header {
    background: white;
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.test-header h2 {
    font-size: 1.8rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.test-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 1rem;
}

.test-options {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1rem;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.test-type, .test-count {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.test-type label, .test-count label {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--text-primary);
    min-width: 80px;
}

.test-type select, .test-count select {
    padding: 0.8rem 1.2rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1.1rem;
    min-width: 150px;
    background-color: white;
    transition: all var(--transition-speed);
}

.test-type select:focus, .test-count select:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

#start-test-btn {
    padding: 0.5rem 1rem;
    font-size: 1rem;
    color: white;
    background-color: var(--primary-color);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
    text-shadow: none;
    width: auto;
    height: auto;
    background-image: none;
    display: inline-block;
}

#start-test-btn:hover {
    background-color: var(--primary-dark);
    transform: translateY(-2px);
}

#start-test-btn:disabled {
    background-color: var(--border-color);
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
    opacity: 0.7;
}

#start-test-btn:active, #start-test-btn:focus {
    border-radius: 8px;
    outline: none;
}

/* 新闻模式 */
.news-container {
    padding: 1rem;
}

.news-header {
    text-align: center;
    margin-bottom: 3rem;
}

.news-header h2 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.news-header p {
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.news-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 12px;
}

/* 新闻卡片样式 */
.news-item {
    background: var(--background-light);
    border-radius: 8px;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.news-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 16px 32px rgba(0, 0, 0, 0.12);
    border-color: rgba(30, 136, 229, 0.2);
}

.news-cover-image {
    width: 100%;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.news-cover-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.news-item:hover .news-cover-image img {
    transform: scale(1.05);
}

.news-content {
    padding: 1.5rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-top-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
}

.news-category {
    display: inline-block;
    padding: 0.4rem 1rem;
    background-color: rgba(30, 136, 229, 0.1);
    color: var(--primary-color);
    border-radius: 30px;
    font-size: 0.85rem;
    font-weight: 500;
    transition: all 0.3s ease;
}

.news-item:hover .news-category {
    background-color: var(--primary-color);
    color: white;
}

.news-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.news-title {
    font-size: 1.4rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 1rem;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.news-item:hover .news-title {
    color: var(--primary-color);
}

.news-location {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.news-country, .news-source {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.3s ease;
}

.news-item:hover .news-country,
.news-item:hover .news-source {
    color: var(--primary-color);
}

.news-summary {
    color: var(--text-secondary);
    font-size: 1rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    max-height: 4.8rem; /* 约等于3行文字 */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    transition: all 0.3s ease;
}

.news-footer {
    margin-top: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    padding-top: 1rem;
}

.news-interactions {
    display: flex;
    gap: 1rem;
}

.news-interaction-btn {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-interaction-btn:hover,
.news-interaction-btn.has-likes,
.news-interaction-btn.has-comments {
    color: var(--primary-color);
}

.news-interaction-btn i {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.news-interaction-btn:hover i {
    transform: scale(1.2);
}

.news-expand-button {
    background-color: var(--primary-color);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
    cursor: pointer;
    border: none;
    outline: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.2);
}

.news-expand-button:hover {
    background-color: var(--primary-dark);
    transform: translateY(-3px);
    box-shadow: 0 6px 16px rgba(30, 136, 229, 0.3);
}

.news-item.expanded .news-summary {
    -webkit-line-clamp: unset;
    max-height: none;
}

.news-full-content {
    display: none;
    color: var(--text-primary);
    font-size: 1.1rem;
    line-height: 1.7;
    margin-bottom: 1.5rem;
    padding-top: 0.5rem;
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.news-full-content img,
.news-summary img {
    display: block;
    margin: 1.5rem auto;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.news-item.expanded .news-full-content {
    display: block;
}

/* 无新闻状态 */
.no-news {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem;
    background-color: rgba(0, 0, 0, 0.02);
    border-radius: 12px;
    color: var(--text-secondary);
    font-size: 1.2rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .news-grid {
        grid-template-columns: 1fr;
    }
    
    .news-cover-image {
        height: 180px;
    }
    
    .news-title {
        font-size: 1.2rem;
    }
}

/* 确保测试模式和学习模式在同一区域切换 */
.mode-container {
    display: none;
    height: 100%;
}

.mode-container.active {
    display: block;
}

#learn-mode, #test-mode, #news-mode {
    height: 100%;
    overflow-y: auto;
}

/* 响应式设计 */
@media (max-width: 1200px) {
    .main-content {
        flex-direction: column;
        height: auto;
    }

    .country-list-container {
        flex: none;
        height: 300px;
    }

    .flag-emblem-container {
        flex-direction: column;
        align-items: center;
    }

    .flag-container, .emblem-container {
        width: 100%;
        max-width: 400px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .maps-container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    main {
        padding: 1rem;
    }

    .mode-selector {
        flex-direction: column;
        gap: 1rem;
    }

    .test-options {
        flex-direction: column;
        align-items: stretch;
    }

    #start-test-btn {
        margin-left: 0;
    }
}

/* 模式特定布局 */
.test-mode .country-list-container,
.news-mode .country-list-container {
    display: none;
}

.test-mode .content-area,
.news-mode .content-area {
    flex: 1;
    margin-left: 0;
}

/* 测试模式样式优化 */
.quiz-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.quiz-question {
    font-size: 1.3rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    line-height: 1.5;
    text-align: center;
}

.quiz-option {
    padding: 0.5rem;  /* 减小上下内边距 */
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    cursor: pointer;
    transition: all var(--transition-speed);
    font-size: 1rem;
    text-align: center;
    height: auto;  /* 移除固定高度 */
    min-height: 40px;  /* 设置最小高度 */
}

.quiz-option:hover {
    background: white;
    border-color: var(--primary-color);
    transform: translateY(-2px);
}

.quiz-option.selected {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.quiz-navigation {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.quiz-score {
    font-size: 1.1rem;
    color: var(--text-primary);
    text-align: left;
    margin-right: auto;
}

.quiz-score span {
    font-weight: 600;
    color: var(--primary-color);
}

.quiz-nav-button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    background: var(--primary-color);
    color: white;
    font-size: 1rem;
    cursor: pointer;
    transition: all var(--transition-speed);
    min-width: 100px;
}

.quiz-nav-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.quiz-nav-button:disabled {
    background: var(--border-color);
    cursor: not-allowed;
    transform: none;
}

.quiz-nav-button.submit-quiz {
    background: #4caf50;
}

.quiz-nav-button.submit-quiz:hover {
    background: #388e3c;
}

/* 测试结果样式 */
.test-result {
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.result-header {
    text-align: center;
    margin-bottom: 2rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid var(--border-color);
}

.score-display {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin: 1rem 0;
}

.result-item {
    margin-bottom: 1.5rem;
    padding: 1.5rem;
    border-radius: 8px;
}

.result-question {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.result-answer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-secondary);
    margin-top: 0.5rem;
}

.result-answer > div {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.wrong-answer {
    color: #f44336;
    text-decoration: line-through;
}

.correct-answer {
    color: #4caf50;
    margin-left: 0.5rem;
}

.answer-status {
    font-weight: 500;
    margin-left: 0.5rem;
}

.correct-status {
    color: #4caf50;
}

.wrong-status {
    color: #f44336;
}

.result-item {
    margin-bottom: 1rem;
    padding: 1rem;
    border-radius: 8px;
    background: white;
}

.result-question {
    font-size: 1.1rem;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

/* 测试结果居中显示 */
#result-details {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

#result-details .result-item {
    width: 90%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 15px;
    text-align: center;
}

#result-details .result-question {
    width: 100%;
    text-align: center;
    font-weight: 600;
    margin-bottom: 8px;
}

#result-details .result-answer {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    margin-bottom: 5px;
}

#result-details .result-correct-answer {
    text-align: center;
    width: 90%;
    margin-bottom: 15px;
    color: #2a6f54;
    padding: 8px;
    border-radius: 4px;
}

#result-details .answer-status {
    margin-left: 10px;
}

/* 优化测试结果显示的其他元素 */
#test-result .score-summary {
    text-align: center;
    margin-bottom: 25px;
}

#retry-btn {
    display: none; /* 默认隐藏重新测试按钮 */
    margin: 20px auto;
}

/* 为上下间距添加一些额外的空间 */
#test-result {
    padding: 20px 0;
}

/* 页脚样式 */
footer {
    padding: 1rem;
    text-align: center;
    color: var(--text-secondary);
    background-color: white;
    box-shadow: 0 -2px 10px var(--shadow-color);
    margin-top: 0.5rem;
}

footer p {
    margin: 0.5rem 0;
    font-size: 0.9rem;
}

footer a {
    color: var(--text-secondary);
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

.pronounce-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0 0.3rem;
    margin: 0;
    font-size: 1rem;
    color: var(--primary-color);
    transition: all 0.3s;
    vertical-align: middle;
}

.pronounce-btn:hover {
    color: var(--accent-color);
    transform: scale(1.2);
}

.pronounce-btn.speaking {
    animation: speak 1s ease-in-out infinite;
}

@keyframes speak {
    0% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.2); opacity: 0.7; }
    100% { transform: scale(1); opacity: 1; }
}

/* 个人中心样式 */
.profile-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.profile-header {
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    color: var(--primary-color);
}

.profile-section {
    background: white;
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.profile-section h3 {
    margin-bottom: 1rem;
    color: var(--text-color);
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.country-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.country-card {
    background: var(--secondary-bg);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
    cursor: pointer;
    transition: transform 0.2s ease;
}

.country-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px var(--shadow-color);
}

.test-history {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 8px;
    min-height: 100px;
}

.test-history:empty::after {
    content: "暂无测试记录";
    color: var(--text-secondary);
    text-align: center;
    width: 100%;
    padding: 2rem;
}

.test-record {
    background: var(--secondary-bg);
    padding: 1rem;
    border-radius: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.test-info {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
}

.test-type {
    font-weight: bold;
    color: var(--primary-color);
}

.test-date {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.test-score {
    font-weight: bold;
    color: var(--accent-color);
}

.comments-history {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-card {
    background: var(--secondary-bg);
    padding: 1rem;
    border-radius: 8px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.comment-country {
    color: var(--primary-color);
    font-weight: bold;
    cursor: pointer;
}

.comment-country:hover {
    text-decoration: underline;
}

.comment-time {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.comment-content {
    color: var(--text-primary);
    line-height: 1.6;
    text-align: left;
}

#profile-mode-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#profile-mode-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

#profile-mode-btn.active {
    background: white;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

#retry-btn {
    display: block;
    margin: 2rem auto;
    padding: 1rem 2.5rem;
    min-width: 180px;
}

.header-controls {
    position: absolute;
    top: 1rem;
    right: 2rem;
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

#admin-btn {
    background: rgba(255, 255, 255, 0.15);
    border: 2px solid rgba(255, 255, 255, 0.2);
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
}

#admin-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

#admin-btn.active {
    background: white;
    color: var(--primary-color);
    border-color: var(--primary-color);
}

.admin-login-container {
    padding: 2rem;
    min-width: 300px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

#admin-modal.modal {
    background-color: rgba(0, 0, 0, 0.5);
}

#admin-modal .modal-content {
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 100%;
    padding: 0;
    border-radius: 12px;
}

#admin-modal .close-modal {
    position: absolute;
    right: 1rem;
    top: 1rem;
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    z-index: 1;
}

#admin-modal .close-modal:hover {
    color: var(--text-primary);
}

#admin-login-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    color: var(--text-primary);
    font-weight: 500;
}

.form-group input {
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.admin-login-btn {
    padding: 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.admin-login-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* 管理员界面样式 */
.button-group {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    width: 100%;
}

.save-button {
    padding: 10px 30px;
    font-size: 16px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background-color 0.3s;
}

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

/* 富文本编辑器样式 */
.rich-editor {
    border: 1px solid var(--border-color);
    border-radius: 0 0 8px 8px;
    padding: 15px;
    min-height: 300px;
    max-height: 500px;
    overflow-y: auto;
    background-color: white;
    line-height: 1.6;
    color: var(--text-primary);
}

/* 富文本编辑器工具栏样式 */
.editor-toolbar {
    display: flex;
    gap: 10px;
    padding: 10px;
    background: #f5f5f5;
    border: 1px solid #ddd;
    border-bottom: none;
    border-radius: 4px 4px 0 0;
    flex-wrap: wrap;
    align-items: center;
}

.editor-toolbar button,
.editor-toolbar select {
    padding: 6px 12px;
    background: white;
    border: 1px solid #ddd;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0;
    height: 32px;
    min-width: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.editor-toolbar button:hover,
.editor-toolbar select:hover {
    background: #f0f0f0;
    transform: translateY(-1px);
}

.editor-toolbar select {
    padding: 0 8px;
}

.font-family-select {
    min-width: 84px;
    max-width: 84px;
    width: 84px;
}

.font-size-select {
    min-width: 62px;
    max-width: 62px;
    width: 62px;
}

.text-align-group {
    display: flex;
    gap: 5px;
}

.text-align-group button {
    padding: 6px 8px;
}

.editor-toolbar button.active {
    background-color: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.rich-editor {
    border: 1px solid #ddd;
    border-radius: 0 0 4px 4px;
    min-height: 300px;
    padding: 15px;
    background: white;
}

.button-container {
    display: flex;
    justify-content: center;
    width: 100%;
    margin-top: 20px;
}

.save-button {
    padding: 12px 40px;
    font-size: 16px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 0 auto;
    display: block;
}

.save-button:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* 预览图片和媒体样式 */
.image-preview {
    max-width: 200px;
    max-height: 200px;
    margin-top: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.rich-editor img {
    max-width: 100%;
    height: auto;
    margin: 10px 0;
}

.rich-editor video,
.rich-editor audio {
    max-width: 100%;
    margin: 10px 0;
}

/* 表单组样式优化 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input[type="text"],
.form-group select {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

/* 管理员面板布局 */
.admin-panel {
    padding: 20px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.admin-controls {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin: 20px 0;
}

.admin-controls button {
    padding: 10px 20px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.admin-controls button:hover {
    background: #1976D2;
}

/* 新闻列表样式 */
.news-list {
    display: grid;
    gap: 20px;
    padding: 20px;
}

.news-item {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
}

.news-cover {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.news-cover img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.news-content {
    padding: 20px;
}

.news-category {
    display: inline-block;
    padding: 4px 8px;
    background: #f0f0f0;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 10px;
}

.news-content h4 {
    margin: 0 0 10px 0;
    font-size: 18px;
}

.news-text {
    margin-bottom: 15px;
    line-height: 1.6;
    max-height: 200px;
    overflow-y: auto;
}

.news-text img,
.news-text video,
.news-text audio {
    max-width: 100%;
    margin: 10px 0;
}

.news-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    font-size: 12px;
    color: #666;
    margin-bottom: 15px;
}

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

.news-actions button {
    padding: 6px 12px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.news-actions button:first-child {
    background: #4CAF50;
    color: white;
}

.news-actions button:last-child {
    background: #f44336;
    color: white;
}

.news-actions button:hover {
    opacity: 0.9;
}

/* 管理员控制区域样式 */
.admin-controls {
    display: flex;
    justify-content: center;
    padding: 20px;
}

.admin-controls button {
    padding: 10px 20px;
    background: #2196F3;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.admin-controls button:hover {
    background: #1976D2;
}

.regional-knowledge {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 8px;
    margin-top: 10px;
    line-height: 1.6;
    white-space: pre-wrap;
}

.regional-knowledge p {
    margin: 0 0 10px 0;
}

#regionalKnowledge {
    width: 100%;
    min-height: 150px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    resize: vertical;
    font-family: inherit;
    line-height: 1.6;
}

#regionalKnowledge:focus {
    border-color: #4CAF50;
    outline: none;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.flag-meaning, .emblem-meaning {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-top: 0.5rem;
    text-align: justify;
    line-height: 1.5;
    max-height: 150px;
    overflow-y: auto;
    padding: 0.5rem;
    background-color: rgba(245, 247, 250, 0.7);
    border-radius: 4px;
}

.flag-meaning::-webkit-scrollbar, .emblem-meaning::-webkit-scrollbar {
    width: 6px;
}

.flag-meaning::-webkit-scrollbar-track, .emblem-meaning::-webkit-scrollbar-track {
    background: var(--background-light);
}

.flag-meaning::-webkit-scrollbar-thumb, .emblem-meaning::-webkit-scrollbar-thumb {
    background-color: var(--primary-color);
    border-radius: 20px;
}

/* 新增样式 */
.center-aligned {
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 100%;
}

.wrong-answer {
    color: #e53935;
    font-weight: bold;
}

.answer-status {
    margin-left: 10px;
    font-weight: bold;
}

.correct-status {
    color: #4caf50;
}

.wrong-status {
    color: #e53935;
}

/* 添加侧边栏折叠按钮 */
.toggle-sidebar {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 100;
    transition: all var(--transition-speed);
    border: none;
    outline: none;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
}

.toggle-sidebar:hover {
    background-color: var(--primary-dark);
    transform: scale(1.05);
}

.toggle-sidebar i {
    font-size: 16px;
    transition: transform var(--transition-speed);
}

/* 折叠状态样式 */
.country-list-container.collapsed {
    flex-basis: 60px !important;
    width: 60px !important;
    min-width: 60px !important;
    transform: translateX(0);
}

.country-list-container.collapsed h2,
.country-list-container.collapsed .search-box,
.country-list-container.collapsed #country-list {
    display: none;
    opacity: 0;
    pointer-events: none;
}

.country-list-container.collapsed .toggle-sidebar {
    right: 14px;
}

.country-list-container.collapsed .toggle-sidebar i {
    transform: rotate(180deg);
}

/* 悬停时展开 */
.country-list-container.collapsed:hover {
    flex-basis: 300px !important;
    width: 300px !important;
    min-width: 300px !important;
}

.country-list-container.collapsed:hover h2,
.country-list-container.collapsed:hover .search-box,
.country-list-container.collapsed:hover #country-list {
    display: block;
    opacity: 1;
    pointer-events: auto;
    transition-delay: 0.2s;
}

/* 这些元素默认是可见的，需要添加过渡效果 */
.country-list-container h2,
.country-list-container .search-box,
.country-list-container #country-list li {
    transition: opacity var(--transition-speed);
    opacity: 1;
}

/* 新闻模态框样式 */
.news-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.news-modal.active {
    opacity: 1;
    visibility: visible;
}

.news-modal-content {
    background-color: white;
    border-radius: 12px;
    max-width: 900px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
    padding: 0;
}

.news-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: background-color 0.3s;
    border: none;
}

.news-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

.news-modal-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
}

.news-modal-body {
    padding: 2rem;
}

.news-modal-title {
    font-size: 1.8rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.news-modal-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.news-modal-meta span {
    display: flex;
    align-items: center;
}

.news-modal-meta i {
    margin-right: 5px;
}

.news-modal-content-text {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-primary);
}

.news-modal-content-text img {
    display: block;
    margin: 1.5rem auto;
    max-width: 100%;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

@media (max-width: 768px) {
    .news-modal-content {
        width: 95%;
    }
    
    .news-modal-title {
        font-size: 1.5rem;
    }
}

/* 新闻封面预览样式 */
#coverPreview {
    margin-top: 10px;
    max-width: 200px;
    max-height: 120px;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid var(--border-color);
}

#coverPreview img {
    width: 100%;
    height: auto;
    max-height: 120px;
    object-fit: cover;
    display: block;
}

/* 新闻互动功能样式 */
.news-interaction {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid var(--border-color);
}

.news-interaction-btn {
    display: flex;
    align-items: center;
    gap: 5px;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 5px 8px;
    border-radius: 15px;
    transition: all 0.2s;
}

.news-interaction-btn:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-color);
}

.news-interaction-btn.active {
    color: var(--primary-color);
}

.news-interaction-count {
    font-size: 0.85rem;
}

/* 模态框内的互动功能 */
.news-modal-interaction {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.news-modal-interaction .news-interaction-btn {
    font-size: 1rem;
    padding: 8px 12px;
}

.news-modal-interaction .news-interaction-count {
    font-size: 0.95rem;
}

/* 评论区样式 */
.news-comments {
    margin-top: 30px;
}

.news-comments-title {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 15px;
}

.news-comment-form {
    display: flex;
    margin-bottom: 20px;
}

.news-comment-input {
    flex: 1;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 10px 15px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s;
}

.news-comment-input:focus {
    border-color: var(--primary-color);
}

.news-comment-submit {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 20px;
    padding: 8px 15px;
    margin-left: 10px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.news-comment-submit:hover {
    background-color: var(--primary-dark);
}

.news-comment-list {
    max-height: 300px;
    overflow-y: auto;
}

.news-comment-item {
    background-color: #f9f9f9;
    border-radius: 8px;
    padding: 10px 15px;
    margin-bottom: 10px;
}

.news-comment-user {
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 5px;
}

.news-comment-content {
    color: var(--text-primary);
    line-height: 1.5;
}

.news-comment-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 5px;
    text-align: right;
}

/* 学习模式下拉框样式 */
.learn-mode-dropdown,
.game-mode-dropdown {
    position: relative;
    display: inline-block;
    flex: 1;
}

.learn-mode-dropdown select,
.game-mode-dropdown select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    padding: 0.5rem 2.5rem 0.5rem 1.5rem;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    outline: none;
    width: 100%;
    transition: all var(--transition-speed);
}

.learn-mode-dropdown::after,
.game-mode-dropdown::after {
    content: '\f0d7';
    font-family: 'Font Awesome 5 Free';
    font-weight: 900;
    color: white;
    position: absolute;
    right: 15px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
}

.learn-mode-dropdown select:hover,
.game-mode-dropdown select:hover,
.learn-mode-dropdown select:focus,
.game-mode-dropdown select:focus {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

.learn-mode-dropdown select option,
.game-mode-dropdown select option {
    background-color: #2c3e50;
    color: white;
    padding: 10px;
}

/* 为禁用的选项设置样式 */
.learn-mode-dropdown select option:disabled,
.game-mode-dropdown select option:disabled {
    color: rgba(255, 255, 255, 0.6);
}

/* 确保下拉框与其他按钮对齐 */
.mode-selector {
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 800px;
    margin: 0 auto;
}

/* 世界信息样式 */
.world-info {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.world-info h2 {
    color: var(--primary-color);
    font-size: 2rem;
    margin-bottom: 2rem;
    text-align: center;
}

.world-info .basic-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1rem;
    padding: 1.5rem;
    background: var(--background-light);
    border-radius: 8px;
    margin-bottom: 2rem;
}

.world-info .basic-info p {
    margin: 0;
    padding: 1rem;
    background: white;
    border-radius: 6px;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: transform 0.3s;
}

.world-info .basic-info p:hover {
    transform: translateY(-2px);
}

.world-info .basic-info strong {
    color: var(--primary-color);
    margin-right: 0.5rem;
}

.world-info .basic-info span {
    color: var(--text-primary);
}

.world-info .video-section {
    margin-bottom: 2rem;
}

.world-info .video-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.world-info .video-section video {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.world-info .maps-section {
    margin-top: 2rem;
}

.world-info .maps-section h3 {
    color: var(--primary-color);
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
}

.world-info .map-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.world-info .map-item {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
    transition: transform 0.3s;
    position: relative;
}

.world-info .map-item:hover {
    transform: translateY(-5px);
}

.world-info .map-item h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.world-info .image-wrapper {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 6px;
}

.world-info .image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: transform 0.3s;
}

.world-info .image-wrapper:hover img {
    transform: scale(1.05);
}

.world-info .map-zoom {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.5);
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.3s;
}

.world-info .map-zoom:hover {
    background: rgba(0, 0, 0, 0.7);
}

.world-info .interaction-section {
    display: flex;
    justify-content: center;
    gap: 2rem;
    padding: 1rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
}

.world-info .like-section,
.world-info .favorite-section,
.world-info .comment-section {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.world-info .like-btn,
.world-info .favorite-btn,
.world-info .comment-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.world-info .like-btn:hover,
.world-info .favorite-btn:hover,
.world-info .comment-btn:hover {
    color: var(--primary-color);
    background: var(--background-light);
}

.world-info .like-btn.active {
    color: #ff4757;
}

.world-info .favorite-btn.active {
    color: #ffa502;
}

.world-info .comment-btn.active {
    color: var(--primary-color);
}

.world-info .comments-container {
    margin-top: 1rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 8px;
    display: none;
}

.world-info .comments-container.show {
    display: block;
}

.world-info .comment-input {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.world-info .comment-input textarea {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
    min-height: 60px;
}

.world-info .comment-input button {
    padding: 0.5rem 1rem;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    transition: background-color 0.3s;
}

.world-info .comment-input button:hover {
    background: var(--primary-dark);
}

.world-info .comments-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.world-info .comment-item {
    background: white;
    padding: 1rem;
    border-radius: 4px;
    box-shadow: 0 2px 4px var(--shadow-color);
}

.world-info .comment-item .comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.world-info .comment-item .comment-content {
    color: var(--text-primary);
    line-height: 1.5;
}

/* 图片模态框样式 */
.image-modal {
    display: flex;
    justify-content: center;
    align-items: center;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    z-index: 1000;
}

.modal-content {
    position: relative;
    max-width: 90%;
    max-height: 90vh;
}

.modal-content img {
    max-width: 100%;
    max-height: 90vh;
    object-fit: contain;
}

.close {
    position: absolute;
    top: -40px;
    right: 0;
    color: #fff;
    font-size: 30px;
    cursor: pointer;
}

.close:hover {
    color: #ddd;
}

/* 世界选项样式 */
.world-item {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    font-weight: 700;
    font-size: 1.2rem;
    text-align: center;
    padding: 0.8rem 1.2rem;
    border-radius: 8px;
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    position: relative;
    cursor: pointer;
    transition: all 0.3s;
    width: 100%;
    margin-left: 0;
}

.world-item:hover {
    transform: translateX(0);
    opacity: 0.9;
}

.world-item.active {
    background: linear-gradient(135deg, #c5dcf7, #90c1f9);
    color: #333;
    font-weight: 600;
    transform: scale(1.02);
    box-shadow: 0 2px 8px rgba(144, 193, 249, 0.3);
    border-left: 4px solid #6ba4e9;
}

/* 移除世界选项的三角形图标 */
.world-item::after {
    display: none !important;
    content: none !important;
    position: absolute;
    right: 1.2rem;
}

/* 国家搜索框样式 */
.country-search-container {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
}

.country-search-input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
    transition: border-color 0.3s;
}

.country-search-input:focus {
    border-color: var(--primary-color);
}

/* 确保选择框样式与搜索框一致 */
.country-search-container select {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    outline: none;
}

/* 可搜索下拉框样式 */
.searchable-select-container {
    position: relative;
    width: 100%;
}

.searchable-select {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
    outline: none;
}

.searchable-select:focus {
    border-color: var(--primary-color);
}

.select-search-wrapper {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    border: 1px solid #ddd;
    border-radius: 0 0 6px 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    z-index: 1000;
    max-height: 300px;
    overflow-y: auto;
    display: none;
}

.select-search-wrapper.active {
    display: block;
}

.select-search-input {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-bottom: 1px solid #eee;
    outline: none;
    font-size: 14px;
}

.select-search-options {
    max-height: 250px;
    overflow-y: auto;
}

.select-search-option {
    padding: 8px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.select-search-option:hover {
    background-color: #f5f5f5;
}

.select-search-option.selected {
    background-color: #e3f2fd;
    color: var(--primary-color);
}

.select-search-option.hidden {
    display: none;
}

/* 评论回复样式 */
.comment-replies {
    margin-left: 20px;
    margin-top: 10px;
    border-left: 2px solid var(--primary-color);
    padding-left: 15px;
}

.reply-item {
    background-color: #f5f7fa;
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 6px;
}

.comment-actions {
    margin-top: 8px;
    text-align: right;
}

.reply-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 3px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.reply-btn:hover {
    background-color: rgba(30, 136, 229, 0.1);
    color: var(--primary-dark);
}

.reply-form-container {
    margin-top: 10px;
    padding: 10px;
    background-color: #f5f7fa;
    border-radius: 6px;
}

.reply-form-container textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
    margin-bottom: 8px;
}

.reply-form-container button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

.reply-form-container button:hover {
    background-color: var(--primary-dark);
}

/* 新闻评论回复样式 */
.news-comment-replies {
    margin-left: 20px;
    margin-top: 10px;
    border-left: 2px solid var(--primary-color);
    padding-left: 15px;
}

.news-reply-item {
    background-color: #f5f7fa;
    margin-bottom: 8px;
    padding: 10px;
    border-radius: 6px;
}

.news-comment-actions {
    margin-top: 8px;
    text-align: right;
}

.news-reply-btn {
    background: none;
    border: none;
    color: var(--primary-color);
    cursor: pointer;
    font-size: 0.9rem;
    padding: 3px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.news-reply-btn:hover {
    background-color: rgba(30, 136, 229, 0.1);
    color: var(--primary-dark);
}

.news-reply-form {
    margin-top: 10px;
    padding: 10px;
    background-color: #f5f7fa;
    border-radius: 6px;
}

.news-reply-form textarea {
    width: 100%;
    min-height: 60px;
    padding: 8px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    resize: vertical;
    margin-bottom: 8px;
}

.news-reply-form button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 6px 12px;
    cursor: pointer;
    transition: background-color 0.2s;
}

/* 地理问答模式样式 */
.qa-container {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 1000px;
    margin: 0 auto;
}

.qa-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 8px;
}

.qa-search {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 400px;
}

#qa-search-input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

#qa-search-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

.qa-list {
    display: grid;
    gap: 1.5rem;
}

.qa-item {
    background: white;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

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

.qa-item-header {
    margin-bottom: 1rem;
}

.qa-item-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.8rem;
}

.qa-item-meta {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.qa-item-meta .user-name {
    color: var(--primary-color);
    font-weight: 500;
}

.qa-item-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.qa-tag {
    padding: 0.3rem 0.8rem;
    background: var(--background-light);
    color: var(--primary-color);
    border-radius: 20px;
    font-size: 0.85rem;
    transition: all 0.3s ease;
}

.qa-tag:hover {
    background: var(--primary-color);
    color: white;
}

.qa-item-content {
    color: var(--text-primary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
}

.qa-item-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border-color);
}

.qa-item-stats {
    display: flex;
    gap: 1.5rem;
}

.qa-stat {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.qa-stat i {
    color: var(--primary-color);
}

.qa-item-actions {
    display: flex;
    gap: 1rem;
}

.qa-action-btn {
    padding: 0.5rem 1rem;
    border: none;
    background: var(--background-light);
    color: var(--primary-color);
    border-radius: 6px;
    font-size: 0.9rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.3rem;
    transition: all 0.3s ease;
}

.qa-action-btn:hover {
    background: var(--primary-color);
    color: white;
}

/* 提问模态框样式 */
#ask-question-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    overflow: auto;
}

#ask-question-modal.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

#ask-question-modal .modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 600px;
    padding: 2.5rem 2rem 2rem;
    position: relative;
    margin: 20px auto;
}

#ask-question-modal.show .modal-content {
    opacity: 1;
}

#ask-question-modal .close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: white;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#ask-question-modal .close-modal:hover {
    background-color: #f5f5f5;
    transform: scale(1.05);
}

.ask-question-container {
    padding: 1rem;
    width: 100%;
}

.ask-question-container h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 0.8rem;
    text-align: center;
    font-weight: 600;
    position: relative;
}

.ask-question-container h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
    margin: 0.2rem auto 0;
    border-radius: 2px;
}

#ask-question-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    width: 100%;
}

#ask-question-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    width: 100%;
}

#ask-question-form label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

#ask-question-form label i {
    font-size: 1rem;
    color: var(--primary-color);
}

#ask-question-form input,
#ask-question-form textarea {
    width: 100%;
    padding: 0.5rem 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    background-color: white;
    color: var(--text-primary);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

#ask-question-form input:focus,
#ask-question-form textarea:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
    outline: none;
}

#ask-question-form textarea {
    min-height: 180px;
    resize: vertical;
    line-height: 1.4;
}

/* 移除图片工具栏相关样式 */
.question-editor-toolbar,
.image-preview-area {
    display: none;
}

.tags-helper {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: 0.1rem;
}

.submit-question-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    box-shadow: 0 4px 15px rgba(30, 136, 229, 0.25);
    position: relative;
    overflow: hidden;
}

.submit-question-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        120deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: 0.5s;
}

.submit-question-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.35);
    background: linear-gradient(135deg, #1976d2, var(--primary-dark));
}

.submit-question-btn:hover::before {
    left: 100%;
}

.submit-question-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.2);
}

.submit-question-btn i {
    font-size: 1.2rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .ask-question-container {
        padding: 0.8rem;
    }

    #ask-question-form textarea {
        min-height: 150px;
    }

    .submit-question-btn {
        padding: 0.7rem 1.2rem;
        font-size: 1rem;
    }
}

/* 评论管理样式 */
.comment-manager,
.qa-manager {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.comment-filters,
.qa-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: center;
    flex-wrap: wrap;
}

.comment-filters select,
.qa-filters select,
.comment-filters input,
.qa-filters input {
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    min-width: 150px;
}

.comment-filters input,
.qa-filters input {
    flex: 1;
    min-width: 200px;
}

.comment-list,
.qa-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.comment-item,
.qa-item {
    background: var(--background-light);
    padding: 1.5rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.comment-item.pinned,
.qa-item.pinned {
    background: #fff8e1;
    border-left: 4px solid #ffd700;
}

.comment-header,
.qa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.comment-author,
.qa-author {
    font-weight: 500;
    color: var(--primary-color);
}

.comment-date,
.qa-date,
.comment-type,
.qa-type,
.qa-status {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.comment-content p,
.qa-content p {
    margin: 0;
    line-height: 1.6;
    color: var(--text-primary);
}

.comment-actions,
.qa-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    justify-content: flex-end;
}

.pin-btn,
.delete-btn {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.pin-btn {
    background: var(--primary-color);
    color: white;
}

.pin-btn:hover {
    background: var(--primary-dark);
}

.delete-btn {
    background: #f44336;
    color: white;
}

.delete-btn:hover {
    background: #d32f2f;
}

.qa-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
}

.qa-status {
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 500;
}

.qa-status[data-status="pending"] {
    background: #fff3e0;
    color: #e65100;
}

.qa-status[data-status="resolved"] {
    background: #e8f5e9;
    color: #2e7d32;
}

@media (max-width: 768px) {
    .comment-filters,
    .qa-filters {
        flex-direction: column;
        align-items: stretch;
    }

    .comment-filters select,
    .qa-filters select,
    .comment-filters input,
    .qa-filters input {
        width: 100%;
    }

    .comment-actions,
    .qa-actions {
        flex-direction: column;
    }

    .pin-btn,
    .delete-btn {
        width: 100%;
        justify-content: center;
    }
}

.qa-tags {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 10px;
}

.qa-tag {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    opacity: 0.8;
}

.no-results {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    background: var(--background-light);
    border-radius: 8px;
    border: 1px dashed var(--border-color);
}

/* 评论和问答项的悬停效果 */
.comment-item:hover,
.qa-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
}

/* 评论和问答的相关信息样式 */
.comment-type,
.qa-type {
    background: var(--primary-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 12px;
    font-size: 0.8rem;
    opacity: 0.8;
}

/* 问答状态标签的颜色 */
.qa-status[data-status="pending"] {
    background: #fff3e0;
    color: #e65100;
    border: 1px solid #ffe0b2;
}

.qa-status[data-status="resolved"] {
    background: #e8f5e9;
    color: #2e7d32;
    border: 1px solid #c8e6c9;
}

/* 加载动画 */
.loading {
    text-align: center;
    padding: 2rem;
}

.loading::after {
    content: '';
    display: inline-block;
    width: 30px;
    height: 30px;
    border: 3px solid var(--border-color);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 回答相关样式 */
.qa-answers {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.qa-answers h4 {
    margin: 0 0 15px 0;
    color: #2c3e50;
    font-size: 16px;
}

.qa-answer {
    padding: 15px;
    margin-bottom: 15px;
    background-color: white;
    border-radius: 6px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.qa-answer:last-child {
    margin-bottom: 0;
}

.qa-answer-content {
    color: #2c3e50;
    line-height: 1.6;
    margin-bottom: 10px;
}

.qa-answer-meta {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: #666;
}

.qa-answer-meta span {
    display: flex;
    align-items: center;
    gap: 5px;
}

.question-preview {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 8px;
}

.question-preview h3 {
    margin: 0 0 10px 0;
    color: #2c3e50;
}

.question-preview p {
    margin: 0;
    color: #666;
    font-size: 14px;
}

#answer-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    display: none;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

#answer-modal.show {
    display: flex !important;
    justify-content: center;
    align-items: center;
    opacity: 1;
    visibility: visible;
}

#answer-modal .modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    padding: 2rem;
    position: relative;
    overflow-y: auto;
    margin: auto;
}

.answer-container {
    width: 100%;
}

.answer-container h2 {
    color: var(--primary-color);
    font-size: 1.4rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
    position: relative;
}

.answer-container h2::after {
    content: '';
    display: block;
    width: 40px;
    height: 2px;
    background: var(--primary-color);
    margin: 0.5rem auto 0;
    border-radius: 2px;
}

.question-preview {
    background: var(--background-light);
    border-radius: 8px;
    padding: 1.2rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--border-color);
}

.question-preview h3 {
    color: var(--text-primary);
    font-size: 1.1rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.question-preview p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.5;
    margin: 0;
}

#answer-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#answer-form .form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

#answer-form label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

#answer-form label i {
    font-size: 1rem;
}

#answer-content {
    width: 100%;
    min-height: 180px;
    padding: 0.8rem;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 0.95rem;
    resize: vertical;
    transition: all 0.3s ease;
    background-color: white;
    color: var(--text-primary);
    line-height: 1.4;
}

#answer-content:focus {
    border-color: var(--primary-color);
    outline: none;
    box-shadow: 0 0 0 3px rgba(30, 136, 229, 0.1);
}

.submit-answer-btn {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-dark));
    color: white;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
}

.submit-answer-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(30, 136, 229, 0.35);
}

.submit-answer-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 12px rgba(30, 136, 229, 0.2);
}

.submit-answer-btn i {
    font-size: 1.2rem;
}

#answer-modal .close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background-color: rgba(0, 0, 0, 0.3);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: background-color 0.3s;
    border: none;
}

#answer-modal .close-modal:hover {
    background-color: rgba(0, 0, 0, 0.5);
}

#answer-modal .close-modal i {
    font-size: 20px;
}

@media (max-width: 768px) {
    #answer-modal .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .answer-container h2 {
        font-size: 1.2rem;
    }

    #answer-content {
        min-height: 150px;
    }

    .submit-answer-btn {
        padding: 0.7rem 1.2rem;
        font-size: 1rem;
    }
}

#question-detail-modal .modal-content {
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    padding: 2.5rem 2rem 2rem;
    position: relative;
    overflow-y: auto;
    margin: 20px auto;
}

#question-detail-modal .close-modal {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background-color: white;
    color: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 18px;
    z-index: 10;
    transition: all 0.3s ease;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

#question-detail-modal .close-modal:hover {
    background-color: #f5f5f5;
    transform: scale(1.05);
}

.question-detail-container {
    width: 100%;
    height: 100%;
    overflow-y: auto;
    padding-right: 10px;
}

/* 添加滚动条样式 */
.question-detail-container::-webkit-scrollbar {
    width: 8px;
}

.question-detail-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.question-detail-container::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.question-detail-container::-webkit-scrollbar-thumb:hover {
    background: #555;
}

.question-detail-header {
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.question-detail-header .question-title {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.question-detail-header .question-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.question-detail-header .question-meta span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.question-detail-header .question-meta .user-name {
    color: var(--primary-color);
    font-weight: 500;
}

.question-detail-header .question-tags {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.question-content {
    font-size: 1.1rem;
    line-height: 1.6;
    color: var(--text-primary);
    margin-bottom: 2rem;
}

.question-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}

.question-stats {
    display: flex;
    gap: 1rem;
    color: var(--text-secondary);
}

.answers-section {
    margin-top: 2rem;
}

.answers-section h3 {
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 1.5rem;
}

.answers-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

@media (max-width: 768px) {
    #question-detail-modal .modal-content {
        width: 95%;
        padding: 1.5rem;
    }

    .question-detail-header .question-title {
        font-size: 1.4rem;
    }

    .question-detail-header .question-meta {
        flex-wrap: wrap;
        gap: 1rem;
    }
}

#map-modal .close-modal {
    position: absolute;
    right: 15px;
    top: 15px;
    font-size: 28px;
    font-weight: bold;
    color: #fff;
    cursor: pointer;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.5);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #fff;
}

#map-modal .close-modal:hover {
    background: rgba(0, 0, 0, 0.7);
}

.game-mode-dropdown {
    display: inline-block;
    position: relative;
    margin: 0 10px;
}

.game-mode-dropdown select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    padding: 8px 35px 8px 12px;
    font-size: 14px;
    border: 1px solid #ddd;
    border-radius: 4px;
    background-color: white;
    cursor: pointer;
    outline: none;
    transition: all 0.3s ease;
    min-width: 120px;
    color: #333;
    font-family: 'Noto Sans SC', sans-serif;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 8px center;
    background-size: 16px;
}

.game-mode-dropdown select:hover {
    border-color: #4CAF50;
}

.game-mode-dropdown select:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

.game-mode-dropdown select option {
    padding: 8px;
    font-size: 14px;
    background-color: white;
    color: #333;
}

/* 移除之前的伪元素箭头 */
.game-mode-dropdown::after {
    content: none;
}

/* 确保下拉框与其他按钮对齐 */
.mode-selector {
    display: flex;
    align-items: center;
    gap: 10px;
}

.game-mode-container {
    position: relative;
    display: inline-block;
}

#game-mode-btn {
    background-color: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-speed);
}

#game-mode-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-3px);
}

#game-mode-btn.active {
    background-color: rgba(255, 255, 255, 0.3);
    border-color: rgba(255, 255, 255, 0.4);
}

.game-selector {
    position: absolute;
    top: 100%;
    left: 0;
    width: 200px;
    background-color: #2c3e50;
    border-radius: 8px;
    padding: 8px;
    margin-top: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
}

.game-selector::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 20px;
    width: 12px;
    height: 12px;
    background-color: #2c3e50;
    transform: rotate(45deg);
}

.game-selector.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.game-option {
    display: block;
    width: 100%;
    padding: 10px 15px;
    margin: 4px 0;
    border: none;
    background-color: transparent;
    color: white;
    text-align: left;
    font-size: 14px;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.2s ease;
}

.game-option:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* 优化学习模式内容区域布局 */
.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
    background-color: var(--bg-secondary);
}

#country-details {
    max-width: 1000px;
    margin: 0 auto;
    padding: 1.5rem;
    background-color: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.info-section {
    margin-bottom: 2rem;
    background-color: var(--background-light);
    border-radius: 12px;
    padding: 1.5rem;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin: 1rem 0;
}

#country-details {
    max-width: 1200px;
    margin: 0 auto;
}

.info-section {
    margin-bottom: 1rem;
}

.info-section:last-child {
    margin-bottom: 0;
}

.info-section h3 {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-color);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 0.8rem;
}

#ask-question-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all var(--transition-speed);
}

#ask-question-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

#ask-question-btn i {
    font-size: 1.1rem;
}

#qa-search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    transition: background var(--transition-speed);
}

#qa-search-btn:hover {
    background: var(--primary-dark);
}

.qa-container {
    padding: 2rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
    max-width: 1000px;
    margin: 0 auto;
}

.qa-filters {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: var(--background-light);
    border-radius: 8px;
}

.qa-search {
    display: flex;
    gap: 0.5rem;
    flex: 1;
    max-width: 400px;
}

#qa-search-input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
}

#qa-search-input:focus {
    border-color: var(--primary-color);
    outline: none;
}

#test-area {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

#test-result {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
}

.admin-login-container h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 1.5rem;
}

/* 清空按钮样式 */
.clear-btn {
    background-color: #f44336;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 8px 16px;
    margin-top: 15px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.clear-btn:hover {
    background-color: #d32f2f;
}

/* 用户登录相关样式 */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    z-index: 9999;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.show {
    display: flex !important;
    animation: modalFadeIn 0.3s ease;
}

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

.modal-content {
    position: relative;
    background-color: #ffffff;
    padding: 2.5rem;
    width: 90%;
    max-width: 420px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
    transform: translateY(0);
    opacity: 1;
    transition: all 0.3s ease;
}

/* 标题样式 */
.login-container h2,
.register-container h2,
.forgot-password-container h2,
.profile-container h2 {
    color: #333;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
    text-align: center;
    font-weight: 600;
}

/* 表单组样式 */
.form-group {
    margin-bottom: 1.25rem;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #555;
    font-size: 0.9rem;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #ffffff;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: #4CAF50;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.1);
    outline: none;
}

.form-group input:hover {
    border-color: #bdbdbd;
}

/* 记住我选项 */
.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 1rem;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* 按钮样式 */
.form-actions {
    margin-top: 1.5rem;
}

.primary-btn,
.secondary-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
    text-align: center;
}

.primary-btn {
    background-color: #4CAF50;
    color: white;
    border: none;
}

.primary-btn:hover {
    background-color: #43A047;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.2);
}

/* 链接样式 */
.form-links {
    margin-top: 1.5rem;
    text-align: center;
    font-size: 0.9rem;
}

.form-links a {
    color: #4CAF50;
    text-decoration: none;
    transition: all 0.3s ease;
}

.form-links a:hover {
    color: #43A047;
    text-decoration: underline;
}

.divider {
    margin: 0 8px;
    color: #ddd;
}

/* 关闭按钮 */
.close-modal {
    position: absolute;
    right: 1.25rem;
    top: 1.25rem;
    width: 32px;
    height: 32px;
    font-size: 1.5rem;
    color: #666;
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border-radius: 50%;
}

.close-modal:hover {
    background-color: #f5f5f5;
    color: #333;
    transform: rotate(90deg);
}

/* 个人中心样式 */
.profile-container {
    background-color: #ffffff;
}

.profile-info {
    margin-bottom: 2rem;
}

.avatar-section {
    text-align: center;
    margin-bottom: 1.5rem;
}

#user-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    margin-bottom: 1rem;
}

.change-avatar-btn {
    padding: 0.5rem 1rem;
    background-color: #f5f5f5;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.change-avatar-btn:hover {
    background-color: #eeeeee;
}

.user-info-section {
    background-color: #f9f9f9;
    padding: 1.5rem;
    border-radius: 8px;
}

.info-item {
    margin-bottom: 1rem;
}

.info-item:last-child {
    margin-bottom: 0;
}

.info-item label {
    display: block;
    color: #666;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.info-item span {
    color: #333;
    font-size: 1rem;
}

.profile-actions {
    display: grid;
    gap: 1rem;
}

.profile-btn {
    padding: 0.875rem;
    border: none;
    border-radius: 8px;
    background-color: #f5f5f5;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.profile-btn:hover {
    background-color: #eeeeee;
}

.profile-btn i {
    font-size: 1.1rem;
}

/* 响应式布局 */
@media (max-width: 768px) {
    .modal-content {
        width: 95%;
        margin: 1rem;
        padding: 2rem;
    }
    
    .login-container h2,
    .register-container h2,
    .forgot-password-container h2,
    .profile-container h2 {
        font-size: 1.5rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .form-actions button {
        width: 100%;
    }
}

.modal .modal-content {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
    padding: 24px;
    position: relative;
    width: 90%;
    max-width: 400px;
    margin: 40px auto;
}

/* 登录、注册、重置密码模态框样式 */
.login-container,
.register-container,
.forgot-password-container {
    padding: 20px;
}

.login-container h2,
.register-container h2,
.forgot-password-container h2 {
    color: #333;
    text-align: center;
    margin-bottom: 24px;
    font-size: 24px;
}

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

.form-group label {
    display: none;
}

.form-group input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid #e0e0e0;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    border-color: #1a73e8;
    outline: none;
}

/* 输入框前的图标 */
.form-group::before {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
    font-size: 16px;
}

.form-group.email-input::before {
    content: "\f0e0"; /* 邮箱图标 */
}

.form-group.password-input::before {
    content: "\f023"; /* 密码图标 */
}

.form-group.username-input::before {
    content: "\f007"; /* 用户名图标 */
}

/* 记住我选项样式 */
.remember-me {
    display: flex;
    align-items: center;
    margin-bottom: 20px;
}

.checkbox-label {
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
    color: #666;
}

.checkbox-label input[type="checkbox"] {
    width: auto;
    margin-right: 8px;
}

/* 按钮样式 */
.primary-btn {
    width: 100%;
    padding: 12px;
    background-color: #1a73e8;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 0.3s;
}

.primary-btn:hover {
    background-color: #1557b0;
}

/* 链接样式 */
.form-links {
    text-align: center;
    margin-top: 16px;
}

.form-links a {
    color: #1a73e8;
    text-decoration: none;
    font-size: 14px;
}

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

.form-links .divider {
    color: #ccc;
    margin: 0 8px;
}

/* 关闭按钮样式 */
.close-modal {
    position: absolute;
    right: 16px;
    top: 16px;
    background: none;
    border: none;
    font-size: 24px;
    color: #666;
    cursor: pointer;
    padding: 4px;
    line-height: 1;
}

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

/* 隐藏学习模式中的互动组件 */
.learn-mode .news-modal-interaction,
.learn-mode .news-comments,
.learn-mode .social-interaction,
.learn-mode .interaction-panel,
.learn-mode .comments-section {
    display: none !important;
}

/* 隐藏地理问答按钮 */
#qa-mode-btn {
    display: none !important;
}

/* 隐藏用户登录图标 */
#profile-mode-btn {
    display: none !important;
}

/* 城市定位游戏样式优化 */
#city-location-game {
    max-width: 800px;
    margin: 0 auto;
    padding: 0.3rem;
    background: transparent;
    overflow: hidden;
}

.game-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.3rem;
    padding: 0.4rem;
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
    border-radius: 8px;
    color: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
}

.score-display, .timer, .round-info {
    font-size: 1.3rem;
    font-weight: 600;
    padding: 0.4rem 0.8rem;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    backdrop-filter: blur(8px);
    color: #3498db;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.3s ease;
}

.city-display {
    text-align: center;
    margin: 0.2rem 0;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.city-display h2 {
    color: #2c3e50;
    font-size: 1.2rem;
    margin-bottom: 0.2rem;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.city-display h3 {
    color: #1a237e;
    font-size: 2.4rem;
    font-weight: 700;
    margin: 0.2rem 0;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.1);
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.coordinates-input {
    margin: 0.2rem 0;
    padding: 0.5rem;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.slider-container {
    margin: 0.2rem 0;
    padding: 0.4rem;
    background: #f8f9fa;
    border-radius: 6px;
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
}

.slider-container label {
    display: block;
    margin-bottom: 0.3rem;
    font-weight: 600;
    color: #1a237e;
    font-size: 1.1rem;
    letter-spacing: 0.2px;
}

.slider-container input[type="range"] {
    width: 100%;
    height: 6px;
    margin: 0.3rem 0;
    -webkit-appearance: none;
    background: #e0e0e0;
    border-radius: 3px;
    outline: none;
    transition: all 0.3s ease;
}

.slider-container input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
    border-radius: 50%;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    border: 2px solid white;
}

.slider-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 0.1rem;
    color: #666;
    font-size: 1rem;
    font-weight: 500;
}

.game-controls {
    display: flex;
    justify-content: center;
    gap: 0.6rem;
    margin-top: 0.5rem;
}

.game-controls button {
    padding: 0.4rem 1.2rem;
    font-size: 1.1rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    position: relative;
    overflow: hidden;
}

.game-controls button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    transition: 0.5s;
}

.game-controls button:hover::before {
    left: 100%;
}

#start-game-btn {
    background: linear-gradient(135deg, #2ecc71 0%, #27ae60 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(46, 204, 113, 0.3);
}

#submit-location-btn {
    background: linear-gradient(135deg, #1a237e 0%, #0d47a1 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(26, 35, 126, 0.3);
}

#start-game-btn:hover,
#submit-location-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2);
}

#start-game-btn:disabled,
#submit-location-btn:disabled {
    background: #bdc3c7;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
    #city-location-game {
        padding: 0.8rem;
    }

    .game-header {
        flex-direction: column;
        gap: 0.8rem;
        text-align: center;
    }

    .city-display h3 {
        font-size: 2rem;
    }

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

    .game-controls button {
        width: 100%;
    }
}

/* 关于我们模态框样式 */
.about-us-container {
    text-align: center;
    padding: 20px;
}

.qrcode-container {
    margin: 20px 0;
}

.qrcode-image {
    max-width: 200px;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.about-us-text {
    font-size: 16px;
    line-height: 1.6;
    color: #333;
    margin-top: 20px;
}

.quiz-image {
    width: 66.67%;  /* 缩小为原来的2/3 */
    max-width: 266.67px;  /* 相应缩小最大宽度 */
    aspect-ratio: 16/10;
    object-fit: contain;
    margin: 0 auto 1.5rem;
    display: block;
    border-radius: 8px;
    box-shadow: 0 2px 8px var(--shadow-color);
}

.quiz-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;  /* 减小选项之间的间距 */
    margin-bottom: 1rem;  /* 减小底部边距 */
}
  