.container {
    max-width: 700px;
    margin: 0 auto;
    padding: 30px;
    background-color: white;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

h1 {
    font-size: 2.2rem;
    color: #2c3e50;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.globe-icon {
    color: #3498db;
}

.subtitle {
    color: #7f8c8d;
    font-size: 1rem;
    max-width: 500px;
    margin: 0 auto;
}

/* 搜索区域样式 */
.search-section {
    /* margin-bottom: 40px; */
}

.search-box {
    position: relative;
    margin-bottom: 25px;
}

.search-label {
    display: block;
    font-weight: 600;
    margin-bottom: 10px;
    color: #f5f0e1;
    font-size: 1.1rem;
}

.search-input {
    width: 100%;
    padding: 16px 20px 16px 50px;
    font-size: 16px;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    outline: none;
    transition: all 0.3s ease;
    background-color: rgba(8, 13, 17, 0.8) !important;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.search-input:focus {
    border-color: #3498db;
    background-color: white;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.15);
}

.search-icon {
    position: absolute;
    left: 20px;
    top: 50%;
    transform: translateY(-50%);
    color: #95a5a6;
    font-size: 18px;
}

/* 下拉框样式 */
.dropdown-container {
    position: relative;
}

.dropdown {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    max-height: 350px;
    overflow-y: auto;
    background: white;
    border: 2px solid #3498db;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: none;
}

.dropdown.active {
    display: block;
}

.dropdown-item {
    padding: 14px 20px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: #f8f9fa;
}

.dropdown-item.selected {
    background-color: #e8f4ff;
}

.flag {
    font-size: 26px;
    margin-right: 15px;
    flex-shrink: 0;
    width: 40px;
    text-align: center;
}

.country-info {
    flex-grow: 1;
    overflow: hidden;
}

.country-name {
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
    font-size: 16px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.country-details {
    font-size: 14px;
    color: #7f8c8d;
    display: flex;
    gap: 20px;
}

.no-results {
    padding: 25px 20px;
    text-align: center;
    color: #95a5a6;
    font-style: italic;
}

/* 选择结果样式 */
.result-section {
    background-color: rgba(8, 13, 17, 0.8);
    border-radius: 12px;
    padding: 25px;
    margin-top: 30px;
    /* border-left: 5px solid #3498db; */
}

.result-title {
    font-size: 1.2rem;
    color: #f5f0e1;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.selected-country-card {
    display: flex;
    align-items: center;
    padding: 20px;
    background-color: #f5f0e1;
    border-radius: 10px;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.05);
}

.selected-flag {
    font-size: 42px;
    margin-right: 20px;
    flex-shrink: 0;
}

.selected-info {
    flex-grow: 1;
}

.selected-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 8px;
}

.selected-details {
    display: flex;
    gap: 25px;
    margin-top: 10px;
    justify-content: space-evenly;
}

.detail-item {
    display: flex;
    flex-direction: column;
}

.detail-label {
    font-size: 13px;
    color: #7f8c8d;
    margin-bottom: 4px;
}

.detail-value {
    font-weight: 600;
    color: #2c3e50;
}

.placeholder-text {
    color: #95a5a6;
    font-style: italic;
    text-align: center;
    padding: 25px;
    font-size: 1rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8rem;
    }

    .selected-country-card {
        flex-direction: column;
        text-align: center;
        padding: 15px;
    }

    .selected-flag {
        margin-right: 0;
        margin-bottom: 15px;
    }

    .selected-details {
        justify-content: center;
    }

    .dropdown-item {
        padding: 12px 15px;
    }

    .flag {
        font-size: 22px;
        width: 35px;
    }

    .country-details {
        gap: 15px;
    }
}

@media (max-width: 480px) {

    .container {
        padding: 15px;
    }

    .search-input {
        padding: 14px 14px 14px 45px;
    }

    .selected-name {
        font-size: 1.2rem;
    }

    .selected-details {
        flex-direction: column;
        gap: 10px;
    }

    .selected-flag {
        font-size: 36px;
    }
}

/* 滚动条样式 */
.dropdown::-webkit-scrollbar {
    width: 8px;
}

.dropdown::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.dropdown::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

.dropdown::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 统计信息样式 */
.stats {
    display: flex;
    justify-content: space-between;
    margin-top: 10px;
    font-size: 14px;
    color: #7f8c8d;
}

/* 键盘导航提示 */
.keyboard-hint {
    font-size: 13px;
    color: #95a5a6;
    margin-top: 8px;
    display: flex;
    align-items: center;
    gap: 5px;
}

.key {
    display: inline-block;
    background-color: #f1f1f1;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2px 6px;
    font-size: 12px;
    font-family: monospace;
}

/* 加载指示器 */
.loading {
    text-align: center;
    padding: 20px;
    color: #7f8c8d;
}

.spinner {
    border: 3px solid #f3f3f3;
    border-top: 3px solid #3498db;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 0 auto 10px;
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}