@charset "UTF-8";

@font-face {
	font-family: "Noto Sans KR";
	src: url(../../fonts/NotoSansCJKkr-Regular.otf);
}

/* ─── CSS Variables (Light Theme) ─── */
:root {
	--bg-primary: #f0f2f5;
	--bg-card: rgba(255, 255, 255, 0.85);
	--bg-card-border: rgba(255, 255, 255, 0.6);
	--bg-input: #f7f8fa;
	--bg-input-focus: #fff;
	--text-primary: #1a1a2e;
	--text-secondary: #64748b;
	--text-placeholder: #94a3b8;
	--border-color: #e2e8f0;
	--border-focus: #3b82f6;
	--accent: #3b82f6;
	--accent-hover: #2563eb;
	--accent-glow: rgba(59, 130, 246, 0.25);
	--error-color: #ef4444;
	--error-bg: rgba(239, 68, 68, 0.08);
	--shadow-card: 0 8px 32px rgba(0, 0, 0, 0.08);
	--shadow-input: 0 1px 3px rgba(0, 0, 0, 0.04);
	--shadow-button: 0 4px 14px rgba(59, 130, 246, 0.35);
	--outline-color: #e2e8f0;
	--outline-hover: #cbd5e1;
	--gradient-start: #e0e7ff;
	--gradient-end: #f0f2f5;
}

/* ─── Dark Theme ─── */
[data-theme="dark"] {
	--bg-primary: #0f172a;
	--bg-card: rgba(30, 41, 59, 0.85);
	--bg-card-border: rgba(51, 65, 85, 0.6);
	--bg-input: #1e293b;
	--bg-input-focus: #273449;
	--text-primary: #f1f5f9;
	--text-secondary: #94a3b8;
	--text-placeholder: #64748b;
	--border-color: #334155;
	--border-focus: #60a5fa;
	--accent: #60a5fa;
	--accent-hover: #3b82f6;
	--accent-glow: rgba(96, 165, 250, 0.25);
	--error-color: #f87171;
	--error-bg: rgba(248, 113, 113, 0.1);
	--shadow-card: 0 8px 32px rgba(0, 0, 0, 0.3);
	--shadow-input: 0 1px 3px rgba(0, 0, 0, 0.2);
	--shadow-button: 0 4px 14px rgba(96, 165, 250, 0.3);
	--outline-color: #334155;
	--outline-hover: #475569;
	--gradient-start: #1e293b;
	--gradient-end: #0f172a;
}

/* ─── Reset ─── */
*, *::before, *::after {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
}

body, html {
	font-family: "Noto Sans KR", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 15px;
	font-weight: 400;
	line-height: 1.5;
	color: var(--text-primary);
	background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
	transition: background 0.4s ease, color 0.3s ease;
	min-height: 100vh;
}

h1, h2, h3, h4, h5, h6, p, span {
	margin: 0;
	padding: 0;
	font: inherit;
}

a {
	text-decoration: none;
	color: var(--accent);
	transition: color 0.2s;
}

a:hover {
	color: var(--accent-hover);
}

button {
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	box-sizing: border-box;
	cursor: pointer;
	border: none;
	outline: none;
}

input {
	font-family: inherit;
	font-size: inherit;
	line-height: inherit;
	box-sizing: border-box;
	outline: none;
}

/* ─── Hide default header/footer ─── */
#header-contents,
#footer-contents {
	display: none !important;
}

#main-contents {
	min-height: 100vh;
}

/* ─── Layout ─── */
.ptg-main {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 100vh;
	padding: 20px;
}

.ptg-main .ptg-w1200 {
	width: 100%;
	max-width: 1200px;
	margin: 0 auto;
	box-sizing: border-box;
	position: relative;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* ─── Card (Glassmorphism) ─── */
.user-auth-form {
	width: 100%;
	max-width: 440px;
	padding: 48px 40px;
	background: var(--bg-card);
	backdrop-filter: blur(20px);
	-webkit-backdrop-filter: blur(20px);
	border: 1px solid var(--bg-card-border);
	border-radius: 20px;
	box-shadow: var(--shadow-card);
	transition: background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
	animation: fadeSlideUp 0.5s ease-out;
	position: relative;
}

@keyframes fadeSlideUp {
	from {
		opacity: 0;
		transform: translateY(24px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* ─── Auth Title (공통) ─── */
.auth-title {
	display: flex;
	flex-direction: column;
	align-items: center;
	width: 100%;
	margin-bottom: 36px;
}

.auth-title .auth-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: 16px;
}

.auth-title .auth-icon img {
	width: 48px;
	height: 48px;
	object-fit: contain;
	filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

[data-theme="dark"] .auth-title .auth-icon img {
	filter: drop-shadow(0 6px 16px rgba(96, 165, 250, 0.45));
}

.auth-title h1 {
	font-size: 20px;
	font-weight: 700;
	color: var(--text-primary);
	letter-spacing: -0.02em;
}

.auth-title p {
	margin-top: 6px;
	font-size: 14px;
	color: var(--text-secondary);
}

/* ─── Form ─── */
.login-form {
	width: 100%;
}

/* ─── Floating Label Input Group (공통) ─── */
.input-group {
	position: relative;
	margin-bottom: 16px;
}

.input-group .ptg-input {
	display: block;
	width: 100%;
	height: 52px;
	padding: 16px 16px 8px;
	border: 1.5px solid var(--border-color);
	border-radius: 12px;
	font-size: 15px;
	color: var(--text-primary);
	background: var(--bg-input);
	box-shadow: var(--shadow-input);
	transition: all 0.25s ease;
}

.input-group .ptg-input:focus {
	border-color: var(--border-focus);
	background: var(--bg-input-focus);
	box-shadow: 0 0 0 3px var(--accent-glow);
}

.input-group .ptg-input::placeholder {
	color: transparent;
}

.input-group .floating-label {
	position: absolute;
	left: 16px;
	top: 50%;
	transform: translateY(-50%);
	font-size: 15px;
	color: var(--text-placeholder);
	pointer-events: none;
	transition: all 0.2s ease;
	background: transparent;
	padding: 0 2px;
}

.input-group .ptg-input:focus ~ .floating-label,
.input-group .ptg-input:not(:placeholder-shown) ~ .floating-label {
	top: 8px;
	transform: translateY(0);
	font-size: 11px;
	color: var(--border-focus);
	letter-spacing: 0.02em;
}

/* ─── Password Toggle (공통) ─── */
.input-group-pw {
	position: relative;
}

.input-group-pw .ptg-input {
	padding-right: 48px;
}

.pw-toggle {
	position: absolute;
	right: 14px;
	top: 50%;
	transform: translateY(-50%);
	background: none;
	border: none;
	color: var(--text-placeholder);
	font-size: 18px;
	cursor: pointer;
	padding: 4px;
	border-radius: 6px;
	transition: color 0.2s;
	display: flex;
	align-items: center;
	justify-content: center;
}

.pw-toggle:hover {
	color: var(--text-secondary);
}

/* ─── Error Message ─── */
.ptg-input-error {
	display: flex;
	align-items: center;
	gap: 8px;
	padding: 10px 14px;
	margin-bottom: 8px;
	color: var(--error-color);
	background: var(--error-bg);
	border-radius: 10px;
	font-size: 13px;
	font-weight: 500;
	animation: shake 0.4s ease;
}

.ptg-input-error svg {
	width: 16px;
	height: 16px;
	flex-shrink: 0;
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	20% { transform: translateX(-6px); }
	40% { transform: translateX(6px); }
	60% { transform: translateX(-4px); }
	80% { transform: translateX(4px); }
}

/* ─── Auth Button (공통) ─── */
.auth-btn {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 50px;
	font-size: 16px;
	font-weight: 600;
	border: none;
	border-radius: 12px;
	cursor: pointer;
	transition: all 0.25s ease;
	letter-spacing: -0.01em;
}

.auth-btn-primary {
	color: #fff;
	background: linear-gradient(135deg, var(--accent), var(--accent-hover));
	box-shadow: var(--shadow-button);
}

.auth-btn-primary:hover {
	transform: translateY(-1px);
	box-shadow: 0 6px 20px var(--accent-glow);
}

.auth-btn-primary:active {
	transform: translateY(0);
	box-shadow: 0 2px 8px var(--accent-glow);
}

.login-form .auth-btn {
	margin-top: 24px;
}

/* ─── Divider ─── */
.login-divider {
	display: flex;
	align-items: center;
	margin: 28px 0 20px;
}

.login-divider::before,
.login-divider::after {
	content: "";
	flex: 1;
	height: 1px;
	background: var(--border-color);
	transition: background 0.3s;
}

.login-divider span {
	padding: 0 14px;
	font-size: 12px;
	color: var(--text-placeholder);
	white-space: nowrap;
}

/* ─── Link Group ─── */
.link-group {
	width: 100%;
}

.link-group > a {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	width: 100%;
	height: 44px;
	font-size: 14px;
	font-weight: 500;
	color: var(--text-secondary);
	background: transparent;
	border: 1.5px solid var(--outline-color);
	border-radius: 12px;
	transition: all 0.2s ease;
}

.link-group > a:hover {
	border-color: var(--outline-hover);
	color: var(--text-primary);
	background: var(--bg-input);
}

.link-group > a svg {
	width: 18px;
	height: 18px;
}

/* ─── Auth Footer (공통) ─── */
.auth-footer {
	margin-top: 32px;
	text-align: center;
	font-size: 12px;
	color: var(--text-placeholder);
}

/* ─── Responsive ─── */
@media (max-width: 480px) {
	.user-auth-form {
		padding: 36px 24px;
		border-radius: 16px;
		max-width: 100%;
	}

	.auth-title .auth-icon {
		width: 48px;
		height: 48px;
	}

	.auth-title {
		margin-bottom: 28px;
	}
}

/* ─── Existing class compatibility ─── */
.warning {
	font-size: 12px;
	color: var(--text-secondary);
}

.warning .red-txt {
	font-size: 14px;
	font-weight: bold;
	color: var(--error-color);
}

.txtBlue {
	color: var(--accent);
}

.txtBlack {
	color: var(--text-primary);
}

.textCode {
	margin-bottom: 30px;
	padding: 20px;
	background-color: var(--bg-input);
	border: 1px solid var(--border-color);
	border-radius: 12px;
	font-size: 15px;
	color: var(--text-secondary);
	text-align: center;
	line-height: 160%;
}

.timer-box {
	width: 25%;
	padding: 7px 15px;
	background-color: var(--accent-glow);
	border-radius: 20px;
	font-size: 14px;
	color: var(--text-primary);
}

.privacyPolicy-box {
	text-align: right;
}

.privacyPolicy-box .privacyPolicy {
	background-color: var(--bg-input);
	border: 1px solid var(--border-color);
	font-size: 12px;
	padding: 5px 8px;
	border-radius: 4px;
	margin-top: 20px;
	color: var(--text-secondary);
	transition: all 0.2s;
}

.privacyPolicy-box .privacyPolicy:hover {
	background-color: var(--bg-input-focus);
	border-color: var(--outline-hover);
}