/* 优化的单选按钮样式 */
.radio-custom {
	appearance: none;
	-webkit-appearance: none;
	-moz-appearance: none;
	width: 1.25rem;
	height: 1.25rem;
	border: 2px solid #9CA3AF;
	border-radius: 50%;
	position: relative;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-right: 0.5rem;
}

.radio-custom:checked {
	border-color: #2878FF;
	background-color: #fff;
}

.radio-custom:checked::after {
	content: "";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 0.625rem;
	height: 0.625rem;
	border-radius: 50%;
	background-color: #2878FF;
}

.radio-custom:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(40, 120, 255, 0.2);
}

/* 优化的复选框样式 */
.checkbox-custom {
	-webkit-appearance: none;
	-moz-appearance: none;
	appearance: none;
	width: 1.25rem;
	height: 1.25rem;
	border: 2px solid #9CA3AF;
	border-radius: 0.375rem;
	position: relative;
	cursor: pointer;
	transition: all 0.2s ease;
	margin-right: 0.5rem;
}

.checkbox-custom:checked {
	border-color: #2878FF;
	background-color: #2878FF;
}

.checkbox-custom:checked::after {
	content: "✓";
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	color: white;
	font-size: 0.875rem;
	font-weight: bold;
}

.checkbox-custom:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(40, 120, 255, 0.2);
}

/* 单选和复选框选项容器选项容器样式 */
.radio-option, .checkbox-option {
	display: flex;
	align-items: center;
	padding: 0.375rem 0.5rem;
	border-radius: 0.5rem;
	transition: background-color 0.2s ease;
	cursor: pointer;
}

.radio-option:hover, .checkbox-option:hover {
	background-color: rgba(40, 120, 255, 0.05);
}

/* 代码展示区域样式 */
.code-display {
	position: relative;
	background-color: #1E293B;
	color: #E2E8F0;
	border-radius: 0.75rem;
	padding: 1.5rem;
	font-family: "Fira Code", monospace;
	font-size: 0.875rem;
	overflow-x: auto;
	line-height: 1.6;
}

.code-display .copy-btn {
	position: absolute;
	top: 0.75rem;
	right: 0.75rem;
	background-color: rgba(255, 255, 255, 0.1);
	color: white;
	border: none;
	border-radius: 0.375rem;
	padding: 0.375rem 0.75rem;
	font-size: 0.75rem;
	cursor: pointer;
	transition: all 0.2s ease;
}

.code-display .copy-btn:hover {
	background-color: rgba(255, 255, 255, 0.2);
}

.code-keyword {
	color: #93C5FD;
}

.code-string {
	color: #A7F3D0;
}

.code-number {
	color: #FCD34D;
}

.code-comment {
	color: #94A3B8;
}

/* 客服卡片样式 */
.support-card {
	background: linear-gradient(135deg, #f0f9ff 0%, #e6f7ff 100%);
	border-radius: 16px;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	border: 1px solid #bae7ff;
}

/* 常见问题样式 */
.faq-item {
	border-bottom: 1px solid #f0f0f0;
	padding: 1rem 0;
	cursor: pointer;
}

.faq-item:last-child {
	border-bottom: none;
}

.faq-question {
	font-weight: 600;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.faq-answer {
	margin-top: 0.5rem;
	color: #6B7280;
	display: none;
}

.faq-item.active .faq-answer {
	display: block;
}

/* 表单组样式 */
.form-group {
	margin-bottom: 1.5rem;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid #f0f0f0;
}

.form-group:last-child {
	border-bottom: none;
	margin-bottom: 0;
	padding-bottom: 0;
}

.form-group-title {
	font-weight: 600;
	margin-bottom: 1rem;
	color: #1F2937;
	display: flex;
	align-items: center;
}

.form-group-title svg {
	color: #2878FF !important;
	margin-right: 0.5rem;
}

.radio-group {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	align-items: center;
}

.checkbox-group {
	display: flex;
	flex-wrap: wrap;
	gap: 1.5rem;
	align-items: center;
}

/* 动态效果 */
.fade-in {
	animation: fadeIn 0.5s ease-in-out;
}

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

.pulse {
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
	100% {
		transform: scale(1);
	}
}

/* 地区选择优化样式 */
.region-select-container {
	margin-top: 1rem;
	padding: 1.5rem;
	border-radius: 0.75rem;
	background-color: #f9fafb;
	border: 1px solid #e5e7eb;
	transition: all 0.3s ease;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.region-select-container:hover {
	border-color: #d1d5db;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.region-select-header {
	font-size: 0.875rem;
	font-weight: 500;
	margin-bottom: 0.75rem;
	color: #4b5563;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid #e5e7eb;
}

.region-select-wrapper {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	margin-bottom: 0.5rem;
}

.region-select-wrapper select {
	flex: 1;
	min-width: 200px;
	padding: 0.65rem 0.75rem;
	border-radius: 0.5rem;
	border: 1px solid #d1d5db;
	background-color: white;
	transition: all 0.2s ease;
}

.region-select-wrapper select:focus {
	border-color: #2878FF;
	box-shadow: 0 0 0 3px rgba(40, 120, 255, 0.1);
	outline: none;
}

.region-select-hint {
	margin-top: 0.75rem;
	font-size: 0.75rem;
	color: #6b7280;
	display: flex;
	align-items: center;
	padding-top: 0.5rem;
	border-top: 1px solid #e5e7eb;
}

.region-select-hint i {
	margin-right: 0.25rem;
	font-size: 0.875rem;
}

.select-disabled {
	opacity: 0.5;
	cursor: not-allowed;
}

/* 优化的数量选择器样式 */
.quantity-selector {
	display: flex;
	align-items: center;
	background-color: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
	overflow: hidden;
	max-width: 200px;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.quantity-btn {
	width: 40px;
	height: 40px;
	display: flex;
	align-items: center;
	justify-content: center;
	border: none;
	background-color: #f9fafb;
	color: #4b5563;
	cursor: pointer;
	transition: all 0.2s ease;
}

.quantity-btn:hover {
	background-color: #f3f4f6;
	color: #2878FF;
}

.quantity-btn:active {
	background-color: #e5e7eb;
}

.quantity-input {
	flex: 1;
	height: 40px;
	padding: 0 12px;
	border: none;
	border-left: 1px solid #e5e7eb;
	border-right: 1px solid #e5e7eb;
	text-align: center;
	font-size: 1rem;
	color: #1f2937;
}

.quantity-input:focus {
	outline: none;
	color: #2878FF;
}

/* 白名单和账号密码优化样式 */
.credentials-section {
	background-color: #f9fafb;
	border-radius: 0.75rem;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	border: 1px solid #e5e7eb;
}

.credentials-section h3 {
	font-weight: 600;
	margin-bottom: 1rem;
	color: #1F2937;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.credentials-section h3 i {
	color: #2878FF;
	margin-right: 0.5rem;
}

.credentials-item {
	display: flex;
	align-items: center;
	padding: 0.75rem 1rem;
	background-color: white;
	border-radius: 0.5rem;
	margin-bottom: 0.75rem;
	border: 1px solid #e5e7eb;
	transition: all 0.2s ease;
}

.credentials-item:hover {
	border-color: #d1d5db;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.credentials-label {
	width: 120px;
	font-weight: 500;
	color: #4b5563;
}

.credentials-value {
	flex: 1;
	padding: 0 1rem;
}

.credentials-actions {
	display: flex;
	gap: 0.5rem;
}

.credentials-btn {
	padding: 0.375rem 0.75rem;
	border-radius: 0.375rem;
	font-size: 0.75rem;
	font-weight: 500;
	transition: all 0.2s ease;
}

/* 白名单样式 */
.whitelist-item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 0.75rem 1rem;
	background-color: white;
	border-radius: 0.5rem;
	margin-bottom: 0.75rem;
	border: 1px solid #e5e7eb;
	transition: all 0.3s ease;
}

.whitelist-item:hover {
	border-color: #d1d5db;
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.whitelist-info {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
}

.whitelist-ip {
	font-family: monospace;
	margin-bottom: 0.25rem;
}

.whitelist-note {
	font-size: 0.75rem;
	color: #6b7280;
	background-color: #f3f4f6;
	padding: 0.125rem 0.5rem;
	border-radius: 4px;
}

.whitelist-status {
	font-size: 0.75rem;
	padding: 0.125rem 0.5rem;
	border-radius: 999px;
	margin-left: 1rem;
}

.status-active {
	background-color: #dcfce7;
	color: #166534;
}

.whitelist-time {
	font-size: 0.75rem;
	color: #6b7280;
	margin-right: 1rem;
}

.whitelist-actions {
	display: flex;
	gap: 0.5rem;
}

.add-whitelist-form {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	margin-top: 1rem;
}

.add-whitelist-row {
	display: flex;
	flex-direction: column;
	gap: 1rem;
	width: 100%;
}

.add-whitelist-input, .add-whitelist-note {
	width: 100%;
	padding: 0.75rem 0.85rem;
	border-radius: 0.5rem;
	border: 1px solid #d1d5db;
	background-color: white;
	transition: all 0.2s ease;
	font-size: 0.9rem;
}

.add-whitelist-input:focus, .add-whitelist-note:focus {
	border-color: #2878FF;
	box-shadow: 0 0 0 3px rgba(40, 120, 255, 0.1);
	outline: none;
}

.input-label {
	display: block;
	margin-bottom: 0.35rem;
	font-size: 0.85rem;
	font-weight: 500;
	color: #4b5563;
}

.add-whitelist-actions {
	display: flex;
	justify-content: flex-end;
	margin-top: 0.5rem;
}

/* 确认对话框样式 */
.confirm-dialog-overlay {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

.confirm-dialog-overlay.active {
	opacity: 1;
	visibility: visible;
}

.confirm-dialog {
	background-color: white;
	border-radius: 0.75rem;
	width: 90%;
	max-width: 400px;
	padding: 1.5rem;
	transform: translateY(-20px);
	transition: transform 0.3s ease;
}

.confirm-dialog-overlay.active .confirm-dialog {
	transform: translateY(0);
}

.confirm-dialog-header {
	font-size: 1.125rem;
	font-weight: 600;
	margin-bottom: 1rem;
	color: #1F2937;
	display: flex;
	align-items: center;
}

.confirm-dialog-header i {
	color: #F43F5E;
	margin-right: 0.5rem;
}

.confirm-dialog-message {
	margin-bottom: 1.5rem;
	color: #4B5563;
	line-height: 1.5;
}

.confirm-dialog-actions {
	display: flex;
	justify-content: flex-end;
	gap: 0.75rem;
}

/* 添加白名单弹窗样式 */
.add-whitelist-modal {
	position: fixed;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background-color: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 100;
	opacity: 0;
	visibility: hidden;
	transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

.modal-content {
	background-color: white;
	border-radius: 0.75rem;
	width: 90%;
	max-width: 500px;
	padding: 1.5rem;
	transform: translateY(-20px);
	transition: transform 0.3s ease;
}

.add-whitelist-modal.active .modal-content {
	transform: translateY(0);
}

.modal-header {
	font-size: 1.125rem;
	font-weight: 600;
	margin-bottom: 1.5rem;
	color: #1F2937;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.modal-header i {
	color: #2878FF;
	margin-right: 0.5rem;
}

.modal-close {
	background: none;
	border: none;
	font-size: 1.25rem;
	cursor: pointer;
	color: #6B7280;
	transition: color 0.2s ease;
}

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

.current-ip-display {
	background-color: #f3f4f6;
	padding: 1rem;
	border-radius: 0.5rem;
	margin: 1rem 0 1.5rem 0;
	border-left: 4px solid #2878FF;
}

.current-ip-display p {
	font-size: 0.875rem;
	color: #4B5563;
	margin-bottom: 0.5rem;
}

.current-ip-value {
	font-family: monospace;
	font-size: 1rem;
	color: #1F2937;
	font-weight: 500;
}

/* 通知提示框样式优化 */
.notification-container {
	position: fixed;
	top: 20px;
	right: 20px;
	z-index: 50;
	display: flex;
	flex-direction: column;
	gap: 10px;
	width: 320px;
}

.notification {
	display: flex;
	align-items: center;
	padding: 12px 16px;
	border-radius: 8px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
	color: white;
	transform: translateX(calc(100% + 20px));
	opacity: 0;
	transition: transform 0.3s ease, opacity 0.3s ease;
	animation: slideIn 0.3s forwards;
    z-index: 1000;
}

@keyframes slideIn {
	to {
		transform: translateX(0);
		opacity: 1;
	}
}

.notification.success {
	background-color: #36D399;
}

.notification.error {
	background-color: #F43F5E;
}

.notification.warning {
	background-color: #FFAB00;
}

.notification.info {
	background-color: #2878FF;
}

.notification-icon {
	margin-right: 12px;
	font-size: 1.25rem;
}

.notification-content {
	flex: 1;
	font-size: 0.875rem;
}

.notification-close {
	background: none;
	border: none;
	color: rgba(255, 255, 255, 0.8);
	cursor: pointer;
	font-size: 1rem;
	margin-left: 8px;
	transition: color 0.2s ease;
}

.notification-close:hover {
	color: white;
}

.notification.exit {
	animation: slideOut 0.3s forwards;
}

@keyframes slideOut {
	from {
		transform: translateX(0);
		opacity: 1;
	}
	to {
		transform: translateX(calc(100% + 20px));
		opacity: 0;
	}
}

/* API使用说明样式 */
.api-instructions {
	background-color: #f0f9ff;
	border-radius: 0.75rem;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	border: 1px solid #bae7ff;
}

.api-instructions h3 {
	font-weight: 600;
	margin-bottom: 1rem;
	color: #1E40AF;
	display: flex;
	align-items: center;
}

.api-instructions h3 i {
	color: #2563EB;
	margin-right: 0.5rem;
}

.api-instructions ul {
	list-style-type: none;
	padding-left: 0;
}

.api-instructions li {
	margin-bottom: 0.75rem;
	padding-left: 1.5rem;
	position: relative;
	color: #334155;
}

.api-instructions li:last-child {
	margin-bottom: 0;
}

.api-instructions li:before {
	content: "•";
	color: #2563EB;
	font-weight: bold;
	position: absolute;
	left: 0.5rem;
}

/* 代码调试区域样式 */
.code-debugger {
	/* background-color: #f8fafc; */
	border-radius: 0.75rem;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	border: 1px solid #e2e8f0;
}

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

.debugger-actions {
	display: flex;
	gap: 0.75rem;
}

.debugger-output {
	background-color: #1e293b;
	color: #f8fafc;
	border-radius: 0.5rem;
	padding: 1rem;
	font-family: monospace;
	font-size: 0.875rem;
	height: 200px;
	overflow-y: auto;
	margin-top: 1rem;
}

.debug-status {
	font-size: 0.875rem;
	margin-top: 0.75rem;
	padding-top: 0.75rem;
	border-top: 1px solid #e2e8f0;
}

.status-success {
	color: #10b981;
}

.status-error {
	color: #ef4444;
}

.status-pending {
	color: #f59e0b;
}

/* 浮动组件样式 - 修复为平滑随动效果 */
.floating-container {
	position: sticky;
	top: 20px;
	z-index: 10;
	transition: transform 0.3s ease-out, box-shadow 0.3s ease-out;
}

/* 移除跳动动画，改为更自然的悬停效果 */
.floating-container:hover {
	transform: translateY(-3px);
	box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 移动端适配 - 小屏幕时取消浮动效果 */
@media (max-width: 1024px) {
	.floating-container {
		position: static;
	}
}

/* 新增：API请求统计图表容器 */
.stats-container {
	background-color: white;
	border-radius: 0.75rem;
	padding: 1.5rem;
	margin-bottom: 1.5rem;
	border: 1px solid #e5e7eb;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

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

.stats-title {
	font-weight: 600;
	color: #1F2937;
	display: flex;
	align-items: center;
}

.stats-title i {
	color: #2878FF;
	margin-right: 0.5rem;
}

.stats-period {
	display: flex;
	gap: 0.5rem;
}

.period-btn {
	padding: 0.25rem 0.75rem;
	border-radius: 0.375rem;
	font-size: 0.75rem;
	background-color: #f3f4f6;
	color: #4b5563;
	border: none;
	cursor: pointer;
	transition: all 0.2s ease;
}

.period-btn.active {
	background-color: #2878FF;
	color: white;
}

.chart-container {
	height: 200px;
	position: relative;
	overflow: hidden;
}

/* 新增：API使用统计卡片 */
.usage-stats {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.stat-card {
	background-color: white;
	border-radius: 0.75rem;
	padding: 1rem;
	border: 1px solid #e5e7eb;
	transition: all 0.3s ease;
}

.stat-card:hover {
	border-color: #d1d5db;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.stat-label {
	font-size: 0.75rem;
	color: #6b7280;
	margin-bottom: 0.25rem;
}

.stat-value {
	font-size: 1.5rem;
	font-weight: 600;
	color: #1F2937;
	margin-bottom: 0.25rem;
}

.stat-trend {
	font-size: 0.75rem;
	display: flex;
	align-items: center;
}

.trend-up {
	color: #10b981;
}

.trend-down {
	color: #ef4444;
}

.trend-up i, .trend-down i {
	margin-right: 0.25rem;
}

.quantity-input {
    -moz-appearance: textfield; /* Firefox */
    appearance: textfield; /* 其他浏览器 */
}
.quantity-input::-webkit-inner-spin-button,
.quantity-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}
/* 白名单空状态样式 */
.whitelist-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 2rem 1rem;
    background-color: #f8fafc;
    border-radius: 0.5rem;
    border: 1px dashed #e2e8f0;
    text-align: center;
    margin-bottom: 1rem;
}

.whitelist-empty-icon {
    font-size: 2.5rem;
    color: #94a3b8;
    margin-bottom: 1rem;
}

.whitelist-empty-title {
    font-weight: 500;
    color: #475569;
    margin-bottom: 0.5rem;
}

.whitelist-empty-message {
    font-size: 0.875rem;
    color: #64748b;
    max-width: 300px;
    margin-bottom: 1.5rem;
}

.whitelist-empty-action {
    padding: 0.5rem 1rem;
    background-color: #2878FF;
    color: white;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s ease;
}

.whitelist-empty-action:hover {
    background-color: #1d62d6;
}