* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "PingFang SC", "Microsoft YaHei", sans-serif;
}

body {
    background: linear-gradient(135deg, #ff7e5f, #feb47b);
    color: #333;
    line-height: 1.5;
    min-height: 100vh;
    padding-top: 55px;
}

.opendata_container {
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    overflow: hidden;
    padding: 5px;
}

.opendata_header {
    text-align: center;
    margin-bottom: 10px;
    padding: 5px;
}

.opendata_h1 {
    color: #e65c00;
    font-size: 28px;
    margin-bottom: 5px;
    font-weight: 700;
}

.opendata_description {
    color: #0A1747;
    font-size: 18px;
    max-width: 700px;
    margin-top: 1.5rem;
    margin-left: auto;
    margin-right: auto;
    font-weight: 700;
    text-align: center;
}

.opendata_search_container {
    display: flex;
    justify-content: center;
    margin: 10px 0;
    padding: 5px;
}

.opendata_search_form {
    display: flex;
    width: 100%;
    max-width: 650px;
    height: 45px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    overflow: hidden;
    background: white;
    border: 2px solid #e65c00;
    border-radius: 21px;
    min-width: 300px;
}

.opendata_search_input {
    flex: 1;
    padding: 0 15px;
    border: none;
    outline: none;
    font-size: 16px;
    background: white;
    min-width: 150px;
}

.opendata_search_input::placeholder {
    color: #999;
    font-size: 16px;
}

.opendata_search_btn {
    background: #e65c00;
    color: white;
    border: none;
    padding: 0 25px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    min-width: 100px;
    flex-shrink: 0;
}

.opendata_search_btn:hover {
    background: #cc4c00;
}

.opendata_search_error {
    color: #e74c3c;
    text-align: center;
    margin-top: 5px;
    font-weight: 500;
    font-size: 14px;
}

.opendata_results_container {
    background: #fff9f5;
    border-radius: 8px;
    padding: 10px;
    margin: 20px auto;
    text-align: center;
    min-height: 150px;
    width: 90%;
    max-width: 800px;
    border: 2px solid #ffa366;
    box-shadow: 0 4px 15px rgba(230, 92, 0, 0.1);
    cursor: pointer;
    transition: all 0.3s;
    display: none;
}

.opendata_results_container.has-results {
    display: block;
}

.opendata_results_title {
    font-size: 18px;
    font-weight: 700;
    color: #e65c00;
    margin-bottom: 10px;
    padding: 3px;
}

.opendata_results_content {
    text-align: left;
    padding: 5px;
}

.opendata_country_item {
    background: white;
    border-radius: 6px;
    padding: 8px;
    margin: 5px 0;
    border-left: 3px solid #e65c00;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.opendata_country_name_container {
    display: flex;
    align-items: center;
    margin-bottom: 3px;
}

.opendata_country_flag {
    width: 20px;
    height: 15px;
    margin-right: 2px;
    object-fit: cover;
    flex-shrink: 0;
}

.opendata_country_name {
    font-weight: 700;
    color: #e65c00;
    font-size: 16px;
}

.opendata_country_details {
    color: #666;
    font-size: 14px;
    margin-top: 3px;
}

.opendata_country_additional_info {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid #eee;
}

.opendata_country_additional_info div {
    margin-bottom: 3px;
    font-size: 14px;
    color: #555;
}

.opendata_scroll_container {
    width: 100%;
    margin: 20px 0;
    padding: 5px;
}

.opendata_scroll_header {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
    padding: 5px;
    text-align: center;
    position: relative;
}

.opendata_scroll_title {
    font-size: 20px;
    font-weight: 700;
    color: #0A1747;
    margin-bottom: 10px;
    margin-top:1rem;
    width: 100%;
    text-align: center;
    order: 2;
}

.opendata_header_controls {
    display: flex;
    align-items: center;
    gap: 10px;
    justify-content: center;
    width: 100%;
    order: 1;
    margin-bottom: 5px;
}

.opendata_language_switch {
    background: #fe6d15;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    min-width: 100px;
}

.opendata_language_switch:hover {
    background: #0A1747;
    transform: translateY(-1px);
}

.opendata_export_btn {
    background: #fe6d15;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s;
    min-width: 100px;
}

.opendata_export_btn:hover {
    background: #0A1747;
    transform: translateY(-1px);
}

.opendata_table_wrapper {
    width: 100%;
    overflow-x: auto;
    background: #f8f8f8;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.opendata_table_container {
    min-width: auto; /* 改为自适应 */
    width: 100%;
}

.opendata_table_header {
    display: flex;
    background: #ff9831;
    color: white;
    font-weight: 700;
    position: sticky;
    top: 0;
    z-index: 10;
    padding: 2px 0;
}

.opendata_table_header_cell {
    padding: 4px 12px; /* 增加内边距 */
    text-align: center;
    white-space: nowrap;
    border-right: 1px solid rgba(255,255,255,0.3);
    flex-shrink: 0;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: auto; /* 改为自适应 */
    flex: 1; /* 平均分配宽度 */
}

/* 为特定列设置不同的flex比例 */
.opendata_table_header_cell:first-child {
    flex: 0.3; /* 国旗列较窄 */
    min-width: 50px;
}

.opendata_table_header_cell:nth-child(2) {
    flex: 1.5; /* 国家名称列较宽 */
    min-width: 160px;
    justify-content: flex-start;
}

.opendata_table_header_cell:nth-child(3) {
    flex: 1.2; /* 首都列中等宽度 */
    min-width: 130px;
    justify-content: flex-start;
}

.opendata_table_header_cell:nth-child(4),
.opendata_table_header_cell:nth-child(5) {
    flex: 0.8; /* 代码列较窄 */
    min-width: 90px;
    justify-content: center;
}

.opendata_table_header_cell:nth-child(6) {
    flex: 1.3; /* 主要语言列较宽 */
    min-width: 140px;
    justify-content: flex-start;
}

.opendata_table_header_cell:nth-child(7) {
    flex: 1; /* 大洲列中等宽度 */
    min-width: 110px;
    justify-content: flex-start;
}

.opendata_table_header_cell:nth-child(8) {
    flex: 1.4; /* 主要城市列较宽 */
    min-width: 150px;
    justify-content: flex-start;
}

.opendata_table_header_cell:nth-child(9) {
    flex: 1.1; /* 货币列中等宽度 */
    min-width: 120px;
    justify-content: flex-start;
}

.opendata_table_header_cell:nth-child(10),
.opendata_table_header_cell:nth-child(11) {
    flex: 0.7; /* 货币代码和符号列较窄 */
    min-width: 80px;
    justify-content: center;
}

.opendata_table_header_cell:last-child {
    border-right: none;
}

.opendata_scroll_content {
    height: 300px;
    overflow-y: auto;
    overflow-x: auto;
}

.opendata_table_row {
    display: flex;
    border-bottom: 1px solid #eee;
    background: white;
    align-items: center;
    padding: 2px 0;
}

.opendata_table_cell {
    padding: 6px 12px; /* 增加内边距 */
    white-space: nowrap;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    font-size: 14px;
    flex: 1; /* 与表头对应 */
    min-width: auto;
}

/* 单元格宽度与表头对应 */
.opendata_table_cell:first-child {
    flex: 0.3;
    min-width: 50px;
    justify-content: center;
}

.opendata_table_cell:nth-child(2) {
    flex: 1.5;
    min-width: 160px;
    justify-content: flex-start;
}

.opendata_table_cell:nth-child(3) {
    flex: 1.2;
    min-width: 130px;
    justify-content: flex-start;
}

.opendata_table_cell:nth-child(4),
.opendata_table_cell:nth-child(5) {
    flex: 0.8;
    min-width: 90px;
    justify-content: center;
}

.opendata_table_cell:nth-child(6) {
    flex: 1.3;
    min-width: 140px;
    justify-content: flex-start;
}

.opendata_table_cell:nth-child(7) {
    flex: 1;
    min-width: 110px;
    justify-content: flex-start;
}

.opendata_table_cell:nth-child(8) {
    flex: 1.4;
    min-width: 150px;
    justify-content: flex-start;
}

.opendata_table_cell:nth-child(9) {
    flex: 1.1;
    min-width: 120px;
    justify-content: flex-start;
}

.opendata_table_cell:nth-child(10),
.opendata_table_cell:nth-child(11) {
    flex: 0.7;
    min-width: 80px;
    justify-content: center;
}

.opendata_table_flag {
    width: auto;
    height: 20px;
    object-fit: cover;
}

.opendata_table_text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.opendata_modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    justify-content: center;
    align-items: center;
}

.opendata_modal_content {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    max-width: 500px;
    width: 90%;
    animation: opendata_modal_popup 0.3s ease-out;
}

@keyframes opendata_modal_popup {
    from {
        transform: scale(0.7);
        opacity: 0;
    }
    to {
        transform: scale(1);
        opacity: 1;
    }
}

.opendata_modal_title {
    font-size: 20px;
    font-weight: 700;
    color: #e65c00;
    margin-bottom: 15px;
    text-align: center;
}

.opendata_language_select {
    width: 100%;
    padding: 10px;
    border: 2px solid #e65c00;
    border-radius: 5px;
    font-size: 16px;
    margin-bottom: 15px;
}

.opendata_modal_actions {
    display: flex;
    justify-content: center;
    gap: 10px;
}

.opendata_modal_btn {
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
    min-width: 80px;
}

.opendata_modal_confirm {
    background: #e65c00;
    color: white;
}

.opendata_modal_confirm:hover {
    background: #0A1747;
}

.opendata_modal_cancel {
    background: #666;
    color: white;
}

.opendata_modal_cancel:hover {
    background: #555;
}

.opendata_checkbox_group {
    max-height: 300px;
    overflow-y: auto;
    margin-bottom: 15px;
    padding-left:10px;
}

.opendata_checkbox_item {
    display: flex;
    align-items: center;
    padding: 8px 0;
    font-size: 16px;
}

.opendata_checkbox_item input {
    margin-right: 10px;
    transform: scale(1.2);
}

@media (max-width: 1024px) {
    .opendata_container {
        padding: 5px;
    }
    
    .opendata_h1 {
        font-size: 26px;
    }
    
    .opendata_table_header_cell,
    .opendata_table_cell {
        padding: 6px 8px;
        font-size: 13px;
    }
}

@media (max-width: 820px) {
    .opendata_h1 {
        font-size: 24px;
    }
    
    .opendata_search_form {
        height: 45px;
    }
    
    .opendata_search_input,
    .opendata_search_btn {
        font-size: 16px;
    }
    
    .opendata_search_input::placeholder {
        font-size: 16px;
    }
    
    .opendata_table_header_cell,
    .opendata_table_cell {
        padding: 5px 6px;
        font-size: 12px;
    }
    
    /* 调整小屏幕下的最小宽度 */
    .opendata_table_header_cell:first-child,
    .opendata_table_cell:first-child {
        min-width: 40px;
    }
    
    .opendata_table_header_cell:nth-child(2),
    .opendata_table_cell:nth-child(2) {
        min-width: 140px;
    }
    
    .opendata_table_header_cell:nth-child(3),
    .opendata_table_cell:nth-child(3) {
        min-width: 110px;
    }
    
    .opendata_table_header_cell:nth-child(4),
    .opendata_table_header_cell:nth-child(5),
    .opendata_table_cell:nth-child(4),
    .opendata_table_cell:nth-child(5) {
        min-width: 70px;
    }
    
    .opendata_table_header_cell:nth-child(6),
    .opendata_table_cell:nth-child(6) {
        min-width: 120px;
    }
    
    .opendata_table_header_cell:nth-child(7),
    .opendata_table_cell:nth-child(7) {
        min-width: 90px;
    }
    
    .opendata_table_header_cell:nth-child(8),
    .opendata_table_cell:nth-child(8) {
        min-width: 130px;
    }
    
    .opendata_table_header_cell:nth-child(9),
    .opendata_table_cell:nth-child(9) {
        min-width: 100px;
    }
    
    .opendata_table_header_cell:nth-child(10),
    .opendata_table_header_cell:nth-child(11),
    .opendata_table_cell:nth-child(10),
    .opendata_table_cell:nth-child(11) {
        min-width: 60px;
    }
}

@media (max-width: 768px) {
    body {
        padding-top: 55px;
    }
    
    .opendata_container {
        padding: 5px;
        margin: 0;
    }
    
    .opendata_search_form {
        flex-direction: row;
        border-radius: 21px;
        height: 45px;
        max-width: 100%;
    }
    
    .opendata_search_input {
        padding: 0 15px;
        font-size: 16px;
    }
    
    .opendata_search_btn {
        padding: 0 25px;
        font-size: 16px;
        min-width: 100px;
    }
    
    .opendata_search_input::placeholder {
        font-size: 16px;
    }
    
    .opendata_scroll_header {
        flex-direction: column;
        align-items: center;
    }
    
    .opendata_header_controls {
        flex-direction: row;
        gap: 10px;
        justify-content: center;
    }
    
    .opendata_language_switch,
    .opendata_export_btn {
        font-size: 14px;
        min-width: 100px;
        padding: 8px 16px;
    }
    
    .opendata_table_header_cell,
    .opendata_table_cell {
        padding: 4px 5px;
        font-size: 11px;
    }
    
    .opendata_table_text {
        max-width: calc(100% - 5px);
    }
}

@media (max-width: 480px) {
    .opendata_search_form {
        height: 45px;
        border-radius: 21px;
    }
    
    .opendata_search_input {
        font-size: 16px;
        padding: 0 15px;
    }
    
    .opendata_search_btn {
        font-size: 16px;
        padding: 0 25px;
        min-width: 100px;
    }
    
    .opendata_search_input::placeholder {
        font-size: 16px;
    }
    
    .opendata_modal_content {
        padding: 15px;
    }
    
    .opendata_header_controls {
        flex-wrap: wrap;
    }
    
    .opendata_language_switch,
    .opendata_export_btn {
        font-size: 14px;
        padding: 8px 16px;
        min-width: 100px;
    }
}

@media (max-width: 450px) {
    .opendata_scroll_header {
        flex-direction: column;
        align-items: center;
    }
    
    .opendata_header_controls {
        order: 1;
        margin-bottom: 8px;
    }
    
    .opendata_scroll_title {
        order: 2;
        margin-bottom: 0;
        font-size: 20px;
    }
    
    .opendata_search_form {
        height: 42px;
    }
    
    .opendata_search_input,
    .opendata_search_btn {
        font-size: 15px;
    }
    
    .opendata_search_input::placeholder {
        font-size: 15px;
    }
    
    .opendata_language_switch,
    .opendata_export_btn {
        font-size: 14px;
        padding: 10px 6px;
        min-width: 90px;
    }
    
    .opendata_table_header_cell,
    .opendata_table_cell {
        padding: 3px 4px;
        font-size: 10px;
    }
    
    /* 进一步调整小屏幕下的最小宽度 */
    .opendata_table_header_cell:first-child,
    .opendata_table_cell:first-child {
        min-width: 35px;
    }
    
    .opendata_table_header_cell:nth-child(2),
    .opendata_table_cell:nth-child(2) {
        min-width: 120px;
    }
    
    .opendata_table_header_cell:nth-child(3),
    .opendata_table_cell:nth-child(3) {
        min-width: 100px;
    }
    
    .opendata_table_header_cell:nth-child(4),
    .opendata_table_header_cell:nth-child(5),
    .opendata_table_cell:nth-child(4),
    .opendata_table_cell:nth-child(5) {
        min-width: 60px;
    }
    
    .opendata_table_header_cell:nth-child(6),
    .opendata_table_cell:nth-child(6) {
        min-width: 100px;
    }
    
    .opendata_table_header_cell:nth-child(7),
    .opendata_table_cell:nth-child(7) {
        min-width: 80px;
    }
    
    .opendata_table_header_cell:nth-child(8),
    .opendata_table_cell:nth-child(8) {
        min-width: 110px;
    }
    
    .opendata_table_header_cell:nth-child(9),
    .opendata_table_cell:nth-child(9) {
        min-width: 90px;
    }
    
    .opendata_table_header_cell:nth-child(10),
    .opendata_table_header_cell:nth-child(11),
    .opendata_table_cell:nth-child(10),
    .opendata_table_cell:nth-child(11) {
        min-width: 50px;
    }
}

.opendata_loading {
    color: #666;
    font-style: italic;
    text-align: center;
    padding: 20px;
    font-size: 16px;
}

.opendata_error {
    color: #e74c3c;
    text-align: center;
    padding: 20px;
    font-size: 16px;
}