/* ==========================================================================
 * 中英文双语留言板 —— 前端样式
 * 卡片式布局 / 渐变头部 / 响应式 / 反馈横幅
 * ========================================================================== */

.gb-page {
	padding: 0;
	margin: 0;
}

.gb-container {
	max-width: 780px;
	margin: 0 auto;
	padding: 0 20px;
}

/* ---------- 整体卡片 ---------- */
.gb-wrap {
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
		"Hiragino Sans GB", "Microsoft YaHei", "Helvetica Neue", Arial, sans-serif;
	color: #1f2937;
	background: #ffffff;
	border-radius: 20px;
	overflow: hidden;
	box-shadow: 0 20px 60px rgba(30, 41, 99, 0.14), 0 4px 16px rgba(30, 41, 99, 0.08);
	margin: 32px 0;
}

/* ---------- 头部 ---------- */
.gb-header {
	background: linear-gradient(135deg, #4f6ef7 0%, #7c5cfc 55%, #9b5cf6 100%);
	color: #ffffff;
	position: relative;
	padding: 44px 36px 56px;
	text-align: center;
}

.gb-header-inner {
	position: relative;
	z-index: 2;
}

.gb-icon {
	width: 62px;
	height: 62px;
	margin: 0 auto 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.16);
	color: #ffffff;
	box-shadow: 0 6px 18px rgba(0, 0, 0, 0.16);
}

.gb-title {
	margin: 0 0 8px;
	font-size: 30px;
	font-weight: 700;
	letter-spacing: 0.5px;
	line-height: 1.3;
}

.gb-subtitle {
	margin: 0 0 20px;
	font-size: 15px;
	font-weight: 400;
	opacity: 0.9;
	line-height: 1.6;
}

/* 语言切换 */
.gb-lang-switch {
	display: inline-flex;
	background: rgba(255, 255, 255, 0.18);
	border-radius: 999px;
	padding: 4px;
	box-shadow: inset 0 1px 3px rgba(0, 0, 0, 0.12);
}

.gb-lang-btn {
	border: 0;
	background: transparent;
	color: rgba(255, 255, 255, 0.85);
	font-size: 13px;
	font-weight: 600;
	padding: 6px 18px;
	border-radius: 999px;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease;
}

.gb-lang-btn:hover {
	color: #ffffff;
}

.gb-lang-btn.is-active {
	background: #ffffff;
	color: #5b4fd8;
}

/* 底部波浪装饰 */
.gb-header-wave {
	position: absolute;
	left: 0;
	right: 0;
	bottom: -1px;
	height: 34px;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 60' preserveAspectRatio='none'%3E%3Cpath d='M0,34 L60,38 C120,42 240,50 360,50 C480,50 600,42 720,36 C840,30 960,28 1080,33 C1200,38 1320,46 1380,50 L1440,53 L1440,60 L0,60 Z' fill='%23ffffff'/%3E%3C/svg%3E");
	background-size: 1440px 60px;
	background-repeat: repeat-x;
}

/* ---------- 表单主体 ---------- */
.gb-body {
	padding: 20px 36px 8px;
}

/* 反馈横幅 */
.gb-feedback {
	display: flex;
	align-items: flex-start;
	gap: 14px;
	border-radius: 14px;
	padding: 16px 18px;
	margin: 0 0 22px;
	font-size: 14px;
	line-height: 1.6;
	animation: gb-fade-in 0.35s ease;
}

@keyframes gb-fade-in {
	from {
		opacity: 0;
		transform: translateY(-6px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.gb-feedback-success {
	background: #ecfdf5;
	border: 1px solid #a7f3d0;
	color: #065f46;
}

.gb-feedback-error {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.gb-feedback-icon {
	flex: 0 0 34px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 15px;
	color: #ffffff;
	margin-top: 2px;
}

.gb-feedback-success .gb-feedback-icon {
	background: #10b981;
}

.gb-feedback-error .gb-feedback-icon {
	background: #ef4444;
}

.gb-feedback-text strong {
	display: block;
	font-size: 15px;
	margin-bottom: 2px;
}

.gb-feedback-text p {
	margin: 0;
}

.gb-link-btn {
	border: 0;
	background: none;
	padding: 0;
	margin-top: 8px;
	color: currentColor;
	text-decoration: underline;
	cursor: pointer;
	font-size: 13px;
	opacity: 0.85;
}

.gb-link-btn:hover {
	opacity: 1;
}

/* ---------- 表单字段 ---------- */
.gb-form {
	margin: 0;
}

.gb-field {
	margin-bottom: 20px;
}

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

.gb-star {
	color: #e11d48;
}

.gb-input-wrap {
	position: relative;
}

.gb-input-icon {
	position: absolute;
	left: 14px;
	top: 50%;
	transform: translateY(-50%);
	color: #9ca3af;
	display: flex;
	pointer-events: none;
}

.gb-input {
	width: 100%;
	box-sizing: border-box;
	border: 1.5px solid #e5e7eb;
	border-radius: 12px;
	background: #fafafa;
	color: #1f2937;
	font-size: 15px;
	padding: 13px 16px 13px 44px;
	transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
	outline: none;
	font-family: inherit;
}

.gb-input::placeholder {
	color: #a3aab5;
}

.gb-input:focus {
	border-color: #6d5ef0;
	background: #ffffff;
	box-shadow: 0 0 0 4px rgba(109, 94, 240, 0.12);
}

.gb-textarea {
	padding-left: 16px;
	resize: vertical;
	min-height: 130px;
	line-height: 1.6;
}

.gb-count {
	display: block;
	margin-top: 6px;
	font-size: 12px;
	color: #9ca3af;
	text-align: right;
}

.gb-count-over {
	color: #e11d48;
	font-weight: 600;
}

/* 蜜罐隐藏字段 */
.gb-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
	opacity: 0;
	pointer-events: none;
}

/* 提交按钮 */
.gb-btn {
	display: block;
	width: 100%;
	border: 0;
	border-radius: 12px;
	padding: 15px 20px;
	font-size: 16px;
	font-weight: 700;
	color: #ffffff;
	background: linear-gradient(135deg, #4f6ef7 0%, #7c5cfc 60%, #9b5cf6 100%);
	cursor: pointer;
	box-shadow: 0 8px 22px rgba(99, 92, 238, 0.30);
	transition: transform 0.15s ease, box-shadow 0.2s ease, filter 0.2s ease;
	font-family: inherit;
	letter-spacing: 1px;
}

.gb-btn:hover {
	filter: brightness(1.05);
	box-shadow: 0 12px 28px rgba(99, 92, 238, 0.40);
	transform: translateY(-1px);
}

.gb-btn:active {
	transform: translateY(0);
	box-shadow: 0 6px 16px rgba(99, 92, 238, 0.28);
}

/* 底部说明 */
.gb-note {
	margin: 16px 0 20px;
	font-size: 12.5px;
	color: #9ca3af;
	line-height: 1.7;
	text-align: center;
}

.gb-dot {
	margin: 0 6px;
}

/* ---------- 页脚 ---------- */
.gb-foot {
	text-align: center;
	font-size: 12px;
	color: #b6bcc6;
	margin: 0;
	padding: 0 0 24px;
}

.gb-foot p {
	margin: 0;
}

/* 隐私说明中英文混合时换行保持可读 */
.gb-note span {
	display: inline;
}

/* ---------- 响应式 ---------- */
@media (max-width: 640px) {
	.gb-container {
		padding: 0 12px;
	}

	.gb-wrap {
		border-radius: 16px;
		margin: 20px 0;
	}

	.gb-header {
		padding: 32px 22px 48px;
	}

	.gb-title {
		font-size: 24px;
	}

	.gb-subtitle {
		font-size: 13.5px;
	}

	.gb-lang-btn {
		padding: 6px 14px;
		font-size: 12.5px;
	}

	.gb-body {
		padding: 16px 20px 4px;
	}

	.gb-btn {
		font-size: 15px;
	}
}

/* ==========================================================================
 * 验证码区
 * ========================================================================== */
.gb-captcha-row {
	display: flex;
	align-items: center;
	gap: 10px;
}

.gb-captcha-input {
	flex: 1;
	min-width: 0;
	height: 47px;
}

.gb-captcha-box {
	flex: none;
	line-height: 0;
	border: 1.5px solid #e5e7eb;
	border-radius: 10px;
	overflow: hidden;
	background: #f1f5f9;
	height: 54px;
}

.gb-captcha-box svg {
	display: block;
	width: 150px;
	height: 54px;
}

.gb-captcha-refresh {
	flex: none;
	width: 42px;
	height: 42px;
	border: 0;
	border-radius: 50%;
	background: #eef2ff;
	color: #5b4fd8;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: background 0.2s ease, transform 0.2s ease;
}

.gb-captcha-refresh:hover {
	background: #e0e7ff;
	transform: rotate(90deg);
}

/* ==========================================================================
 * 提交成功弹窗（醒目提示）
 * ========================================================================== */
.gb-modal-overlay {
	position: fixed;
	inset: 0;
	z-index: 99999;
	background: rgba(15, 23, 42, 0.55);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 20px;
	animation: gb-fade-in 0.25s ease;
}

.gb-modal {
	position: relative;
	background: #ffffff;
	border-radius: 18px;
	max-width: 380px;
	width: 100%;
	padding: 38px 30px 30px;
	text-align: center;
	box-shadow: 0 24px 70px rgba(15, 23, 42, 0.35);
	animation: gb-modal-in 0.3s ease;
}

@keyframes gb-modal-in {
	from {
		opacity: 0;
		transform: translateY(14px) scale(0.96);
	}
	to {
		opacity: 1;
		transform: translateY(0) scale(1);
	}
}

.gb-modal-close {
	position: absolute;
	top: 12px;
	right: 14px;
	border: 0;
	background: none;
	font-size: 24px;
	line-height: 1;
	color: #94a3b8;
	cursor: pointer;
	padding: 4px 8px;
}

.gb-modal-close:hover {
	color: #334155;
}

.gb-modal-icon {
	width: 64px;
	height: 64px;
	margin: 0 auto 14px;
	border-radius: 50%;
	background: #d1fae5;
	color: #059669;
	font-size: 30px;
	font-weight: 700;
	display: flex;
	align-items: center;
	justify-content: center;
}

.gb-modal-title {
	margin: 0 0 8px;
	font-size: 20px;
	font-weight: 700;
	color: #065f46;
}

.gb-modal-body {
	margin: 0 0 22px;
	font-size: 14.5px;
	color: #475569;
	line-height: 1.7;
}

.gb-modal-actions {
	display: flex;
	justify-content: center;
}

.gb-modal-btn {
	width: auto;
	padding: 12px 26px;
	font-size: 15px;
}

/* ---------- 响应式补充 ---------- */
@media (max-width: 640px) {
	.gb-captcha-box {
		height: 42px;
	}

	.gb-captcha-box svg {
		width: 112px;
		height: 42px;
	}

	.gb-captcha-refresh {
		width: 38px;
		height: 38px;
	}

	.gb-modal {
		padding: 32px 22px 24px;
	}
}