/* 域名批量查询样式 */

/* 批量查询按钮 - 与AI生成按钮样式一致 */
.batch-query-btn {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    color: #1565c0;
    border: 1px solid #90caf9;
    padding: 0 12px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-left: 8px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    vertical-align: middle;
}

.batch-query-btn:hover {
    background: linear-gradient(135deg, #bbdefb, #90caf9);
    color: #0d47a1;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(144, 202, 249, 0.3);
}

.batch-query-btn:active {
    transform: translateY(0);
    box-shadow: 0 1px 4px rgba(144, 202, 249, 0.2);
}

/* 域名查询弹窗 - 居中显示 */
.domain-query-modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.domain-query-modal .modal-content {
    background-color: #fff;
    margin: 2% auto;
    padding: 0;
    border-radius: 12px;
    width: 95%;
    max-width: 900px;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
    animation: domainModalSlideIn 0.4s ease-out;
    position: relative;
    z-index: 10001;
}

@keyframes domainModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-40px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.domain-query-modal .modal-header {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    padding: 20px 24px;
    border-radius: 12px 12px 0 0;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.domain-query-modal .modal-header h3 {
    margin: 0;
    color: #1565c0;
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.domain-query-modal .close {
    color: #1565c0;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: none;
    border: none;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.domain-query-modal .close:hover {
    background-color: rgba(21, 101, 192, 0.1);
    transform: scale(1.1);
}

.domain-query-modal .modal-body {
    padding: 24px;
}

/* 查询表单优化 */
.query-form {
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 24px;
}

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

.query-form label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
    font-size: 14px;
}

.query-form textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

.query-form textarea:focus {
    outline: none;
    border-color: #90caf9;
    box-shadow: 0 0 0 3px rgba(144, 202, 249, 0.1);
}

.form-hint {
    display: block;
    margin-top: 6px;
    font-size: 12px;
    color: #666;
    font-style: italic;
}

/* 国家选择区域优化 */
.select-countries-btn {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border: 2px solid #e1e5e9;
    padding: 12px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: all 0.3s ease;
    margin-bottom: 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.select-countries-btn:hover {
    background: linear-gradient(135deg, #e9ecef, #dee2e6);
    border-color: #90caf9;
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(144, 202, 249, 0.2);
}

.select-countries-btn::after {
    content: '▼';
    font-size: 10px;
    color: #666;
}

.selected-countries {
    min-height: 50px;
    padding: 12px;
    background: #fff;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    font-size: 14px;
    transition: border-color 0.3s ease;
}

.selected-countries:hover {
    border-color: #90caf9;
}

.no-selection {
    color: #999;
    font-style: italic;
    display: flex;
    align-items: center;
    justify-content: center;
    height: 26px;
}

.country-tag {
    display: inline-block;
    background: linear-gradient(135deg, #90caf9, #64b5f6);
    color: white;
    padding: 6px 12px;
    margin: 3px 6px 3px 0;
    border-radius: 16px;
    font-size: 20px;
    font-weight: 500;
    box-shadow: 0 2px 4px rgba(144, 202, 249, 0.3);
    transition: all 0.3s ease;
}

.country-tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 6px rgba(144, 202, 249, 0.4);
}

/* 表单操作按钮优化 */
.form-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    margin-top: 28px;
    padding-top: 20px;
    border-top: 1px solid #e0e0e0;
}

.query-btn {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
    border: none;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.3);
}

.query-btn:hover:not(:disabled) {
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(25, 118, 210, 0.4);
}

.query-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.cancel-btn {
    background: #f5f5f5;
    color: #666;
    border: 1px solid #ddd;
    padding: 14px 32px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.cancel-btn:hover {
    background: #e0e0e0;
    color: #333;
    transform: translateY(-1px);
}

/* 国家选择弹窗优化 */
.country-select-modal {
    display: none;
    position: fixed;
    z-index: 10001;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
}

.country-select-modal .modal-content {
    background-color: #fff;
    margin: 3% auto;
    padding: 0;
    border-radius: 16px;
    width: 85%;
    max-width: 700px;
    max-height: 100vh;
    overflow: hidden;
    box-shadow: 0 30px 100px rgba(0, 0, 0, 0.25), 0 10px 40px rgba(0, 0, 0, 0.15);
    animation: countryModalSlideIn 0.4s ease-out;
    position: relative;
    z-index: 10002;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

@keyframes countryModalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.country-select-modal .modal-header {
    background: linear-gradient(135deg, #e3f2fd, #bbdefb);
    padding: 24px 28px;
    border-bottom: 2px solid #e1f5fe;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.country-select-modal .modal-header h3 {
    margin: 0;
    color: #1565c0;
    font-size: 20px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.country-select-modal .modal-header h3::before {
    content: '🌍';
    font-size: 22px;
}

.country-select-modal .close {
    color: #1565c0;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid #90caf9;
    padding: 8px 12px;
    border-radius: 50%;
    transition: all 0.3s ease;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(144, 202, 249, 0.3);
}

.country-select-modal .close:hover {
    background: rgba(21, 101, 192, 0.1);
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 4px 12px rgba(144, 202, 249, 0.4);
}

.country-select-modal .modal-body {
    padding: 20px 24px;
}

.country-select-actions {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
    padding: 20px 24px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-radius: 12px;
    border: 1px solid #e1e5e9;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.select-all-btn, .clear-all-btn {
    padding: 12px 24px;
    border: 2px solid transparent;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.3s ease;
    flex: 1;
    text-align: center;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.select-all-btn {
    background: linear-gradient(135deg, #4caf50, #388e3c);
    color: white;
}

.select-all-btn:hover {
    background: linear-gradient(135deg, #388e3c, #2e7d32);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(76, 175, 80, 0.3);
}

.clear-all-btn {
    background: linear-gradient(135deg, #f44336, #d32f2f);
    color: white;
}

.clear-all-btn:hover {
    background: linear-gradient(135deg, #d32f2f, #c62828);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.3);
}

.countries-list {
    max-height: 400px;
    overflow-y: auto;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    padding: 8px;
    background: #fff;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.05);
}

/* 美化滚动条 */
.countries-list::-webkit-scrollbar {
    width: 8px;
}

.countries-list::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.countries-list::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, #90caf9, #64b5f6);
    border-radius: 10px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.countries-list::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, #64b5f6, #42a5f5);
}

.country-item {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    margin: 4px 0;
    border-radius: 8px;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
}

.country-item:hover {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-color: #90caf9;
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(144, 202, 249, 0.2);
}

.country-item input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-right: 16px;
    accent-color: #1976d2;
    cursor: pointer;
    border-radius: 4px;
    flex-shrink: 0;
}

.country-info {
    display: flex;
    flex-direction: row;
    flex: 1;
    gap: 16px;
    align-items: center;
}

.country-item label {
    cursor: pointer;
    font-size: 20px;
    font-weight: 600;
    margin: 0;
    color: #333;
    line-height: 1.3;
    min-width: 120px;
    flex-shrink: 0;
}

.country-domains-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: center;
}

.country-domains {
    font-size: 16px;
    color: black;
    background: linear-gradient(135deg, #e3f2fd, #f3e5f5);
    padding: 6px 12px;
    border-radius: 16px;
    font-weight: 500;
    display: inline-block;
    border: 1px solid #e1e5e9;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    margin: 0;
    white-space: nowrap;
}

.country-select-footer {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 28px;
    padding: 24px 28px;
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    border-top: 2px solid #e1f5fe;
    border-radius: 0 0 16px 16px;
}

.confirm-countries-btn {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
    border: none;
    padding: 16px 36px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 6px 16px rgba(25, 118, 210, 0.3);
    flex: 1;
    max-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.confirm-countries-btn::before {
    content: '✓';
    font-size: 16px;
    font-weight: bold;
}

.confirm-countries-btn:hover {
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(25, 118, 210, 0.4);
}

.cancel-countries-btn {
    background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
    color: #666;
    border: 2px solid #ddd;
    padding: 16px 36px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex: 1;
    max-width: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.cancel-countries-btn::before {
    content: '✕';
    font-size: 14px;
    font-weight: bold;
}

.cancel-countries-btn:hover {
    background: linear-gradient(135deg, #ffebee, #ffcdd2);
    color: #d32f2f;
    border-color: #f44336;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(244, 67, 54, 0.2);
}

/* 查询结果区域优化 */
.query-results {
    margin-top: 30px;
    padding-top: 24px;
    border-top: 2px solid #e1e5e9;
    animation: resultsSlideIn 0.5s ease-out;
}

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

.results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 16px 20px;
    background: linear-gradient(135deg, #f3f8ff, #e8f4fd);
    border-radius: 8px;
    border: 1px solid #e3f2fd;
}

.results-header h4 {
    margin: 0;
    color: #1565c0;
    font-size: 18px;
    font-weight: 600;
}

.results-stats {
    font-size: 14px;
    color: #666;
    font-weight: 500;
}

.results-table-container {
    max-height: 450px;
    overflow-y: auto;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.results-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    background: #fff;
}

.results-table th {
    background: linear-gradient(135deg, #f8f9fa, #e9ecef);
    padding: 16px 12px;
    text-align: left;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #e1e5e9;
    position: sticky;
    top: 0;
    z-index: 1;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.results-table td {
    padding: 14px 12px;
    border-bottom: 1px solid #f1f3f4;
    vertical-align: middle;
}

.results-table tbody tr {
    transition: background-color 0.2s ease;
}

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

.results-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.results-table tbody tr:nth-child(even):hover {
    background: #f0f0f0;
}

/* 状态标识优化 */
.status-available {
    color: #4caf50;
    font-weight: 700;
    font-size: 16px;
}

.status-unavailable {
    color: #f44336;
    font-weight: 700;
    font-size: 16px;
}

.status-error {
    color: #ff9800;
    font-weight: 600;
    font-size: 13px;
}

/* 结果操作按钮 */
.results-actions {
    display: flex;
    gap: 16px;
    justify-content: center;
    padding-top: 20px;
}

.export-btn, .new-query-btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
}

.export-btn {
    background: linear-gradient(135deg, #17a2b8, #138496);
    color: white;
}

.export-btn:hover {
    background: linear-gradient(135deg, #138496, #117a8b);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(23, 162, 184, 0.3);
}

.new-query-btn {
    background: linear-gradient(135deg, #1976d2, #1565c0);
    color: white;
}

.new-query-btn:hover {
    background: linear-gradient(135deg, #1565c0, #0d47a1);
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(25, 118, 210, 0.3);
}

/* 加载状态优化 */
.loading-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    border-radius: 12px;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1976d2;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin-bottom: 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    font-size: 16px;
    color: #1976d2;
    font-weight: 500;
    text-align: center;
    margin-bottom: 20px;
}

/* 进度条样式 */
.progress-container {
    margin-top: 20px;
    width: 100%;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background-color: #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 8px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #2196f3, #21cbf3);
    border-radius: 4px;
    transition: width 0.3s ease;
    width: 0%;
}

.progress-text {
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

/* 自定义域名后缀样式 */
.custom-domains-separator {
    display: flex;
    align-items: center;
    margin: 20px 0 15px;
    color: #666;
    font-size: 14px;
    font-weight: 500;
}

.custom-domains-separator hr {
    flex: 1;
    border: none;
    border-top: 1px solid #e0e0e0;
    margin: 0 15px;
}

.custom-domains-section {
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 15px;
}

.custom-input-container {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.custom-domain-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.custom-domain-input:focus {
    outline: none;
    border-color: #2196f3;
    box-shadow: 0 0 0 2px rgba(33, 150, 243, 0.1);
}

.add-custom-domain-btn {
    padding: 8px 16px;
    background: linear-gradient(135deg, #2196f3, #21cbf3);
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
}

.add-custom-domain-btn:hover {
    background: linear-gradient(135deg, #1976d2, #1e88e5);
    transform: translateY(-1px);
    box-shadow: 0 3px 8px rgba(33, 150, 243, 0.3);
}

.custom-domains-list {
    min-height: 40px;
}

.no-custom-domains {
    color: #999;
    font-style: italic;
    text-align: center;
    padding: 20px;
}

.custom-domain-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 12px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    margin-bottom: 8px;
}

.custom-domain-text {
    font-family: monospace;
    font-size: 14px;
    color: #333;
}

.remove-custom-domain-btn {
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 16px;
    line-height: 1;
    cursor: pointer;
    transition: all 0.3s ease;
}

.remove-custom-domain-btn:hover {
    background: #cc0000;
    transform: scale(1.1);
}

.custom-domains-option {
    border-top: 2px solid #e3f2fd;
    background: linear-gradient(135deg, #f8f9fa, #e3f2fd);
}

/* 响应式设计优化 */
@media (max-width: 768px) {
    .domain-query-modal .modal-content {
        width: 98%;
        margin: 1% auto;
        max-height: 95vh;
    }
    
    .domain-query-modal .modal-header {
        padding: 16px 20px;
    }
    
    .domain-query-modal .modal-body {
        padding: 20px;
    }
    
    .query-form {
        padding: 16px;
    }
    
    .form-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .form-actions button {
        width: 100%;
        padding: 14px;
    }
    
    .country-select-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .country-select-actions button {
        width: 100%;
    }
    
    .results-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 12px 16px;
    }
    
    .results-actions {
        flex-direction: column;
        gap: 12px;
    }
    
    .results-actions button {
        width: 100%;
    }
    
    .results-table {
        font-size: 12px;
    }
    
    .results-table th,
    .results-table td {
        padding: 10px 8px;
    }
    
    .country-select-footer {
        flex-direction: column;
        gap: 12px;
    }
    
    .country-select-footer button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .batch-query-btn {
        font-size: 10px;
        padding: 4px 8px;
        margin-left: 4px;
    }
    
    .domain-query-modal .modal-content {
        width: 95vw;
        margin: 2% auto;
    }
    
    .country-select-modal .modal-content {
        width: 95vw;
    }
    
    .countries-list {
        max-height: 250px;
        padding: 12px;
    }
    
    .country-item {
        padding: 10px 0;
    }
    
    .country-item label {
        font-size: 13px;
    }
    
    .country-domains {
        font-size: 10px;
        padding: 3px 6px;
    }
    
    .loading-spinner {
        width: 40px;
        height: 40px;
    }
    
    .loading-text {
        font-size: 14px;
    }
}