:root {
	--bg-dark: #080b11;
	--card-bg: rgba(20, 26, 38, 0.7);
	--card-border: rgba(255, 255, 255, 0.08);
	--accent-cyan: #00f2fe;
	--accent-purple: #7928ca;
	--accent-blue: #2563eb;
	--text-main: #f8fafc;
	--text-muted: #94a3b8;
	--status-green: #10b981;
}

* {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

html, body {
	touch-action: manipulation;
	-webkit-text-size-adjust: 100%; /* 모바일 가로/세로 전환 시 글자 크기 자동 확대 방지 */
	text-size-adjust: 100%;
}

body {
	background-color: var(--bg-dark);
	color: var(--text-main);
	overflow-x: hidden;
	line-height: 1.6;
}

a {
	cursor: pointer;
}

/* Background Gradients */
.glow-top {
	position: absolute;
	top: -150px;
	left: 50%;
	transform: translateX(-50%);
	width: 700px;
	height: 500px;
	background: radial-gradient(circle, rgba(121, 40, 202, 0.2) 0%, rgba(0, 242, 254, 0.1) 40%, rgba(0, 0, 0, 0) 70%);
	z-index: -1;
	filter: blur(80px);
}

/* Header Navigation */
header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.25rem 6%;
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	background: rgba(8, 11, 17, 0.8);
	position: sticky;
	top: 0;
	z-index: 100;
	border-bottom: 1px solid var(--card-border);
}

.logo {
	font-size: 1.5rem;
	font-weight: 800;
	background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
	display: flex;
	align-items: center;
	gap: 10px;
	letter-spacing: -0.5px;
}

.logo-image {
	width: 42px;
	height: 42px;
	flex: 0 0 auto;
	object-fit: contain;
	border-radius: 50%;
}

.logo > a,
.logo > span {
	color: var(--text-main);
	-webkit-text-fill-color: var(--text-main);
}

.logo-badge {
	font-size: 0.7rem;
	padding: 2px 8px;
	border-radius: 20px;
	background: rgba(0, 242, 254, 0.15);
	color: var(--accent-cyan);
	border: 1px solid rgba(0, 242, 254, 0.3);
	-webkit-text-fill-color: initial;
}

nav {
	display: flex;
	gap: 2rem;
}

nav a {
	color: var(--text-muted);
	text-decoration: none;
	font-weight: 500;
	font-size: 0.95rem;
	transition: color 0.2s;
}

nav a:hover {
	color: var(--text-main);
}

.header-account,
.header-account form {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.header-user-name {
	color: var(--text-muted);
	font-size: 0.9rem;
}

.account-menu {
	position: relative;
}

.account-menu summary {
	align-items: center;
	cursor: pointer;
	display: flex;
	gap: 0.5rem;
	list-style: none;
}

.account-menu summary::-webkit-details-marker {
	display: none;
}

.account-menu summary:hover {
	color: var(--text-main);
}

.account-menu summary i {
	font-size: 0.65rem;
}

.account-menu-dropdown {
	position: absolute;
	top: calc(100% + 0.75rem);
	right: 0;
	min-width: 180px;
	padding: 0.5rem;
	background: #141a26;
	border: 1px solid var(--card-border);
	border-radius: 10px;
	box-shadow: 0 12px 30px rgba(0, 0, 0, 0.4);
	z-index: 120;
}

.account-menu-dropdown a,
.account-menu-dropdown button {
	align-items: center;
	background: transparent;
	border: 0;
	border-radius: 7px;
	color: var(--text-muted);
	display: flex;
	font: inherit;
	font-size: 0.9rem;
	padding: 0.65rem 0.75rem;
	text-align: left;
	text-decoration: none;
	width: 100%;
}

.account-menu-dropdown a:hover,
.account-menu-dropdown button:hover {
	background: rgba(255, 255, 255, 0.08);
	color: var(--text-main);
}

.account-menu-dropdown form {
	display: block;
	margin: 0;
}

.account-menu-dropdown button {
	cursor: pointer;
}

.btn-logout {
	background: rgba(255, 255, 255, 0.08);
	box-shadow: none;
}

.header-account form {
	margin: 0;
}

.btn-connect {
	background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
	color: #fff;
	text-decoration: none;
	font-weight: 600;
	font-size: 0.9rem;
	padding: 0.65rem 1.4rem;
	border-radius: 10px;
	border: none;
	cursor: pointer;
	box-shadow: 0 4px 20px rgba(121, 40, 202, 0.35);
	transition: all 0.2s ease;
}

.btn-connect:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 25px rgba(121, 40, 202, 0.5);
}

.btn-connect.btn-logout {
	font-size: 0.85rem;
	line-height: 1.2;
	padding: 0.2rem 0.8rem;
}

/* Hero Section */
.hero {
	text-align: center;
	padding: 2rem 1rem 1.2rem;
	max-width: 900px;
	margin: 0 auto;
}

.hero-tag {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 0.4rem 1.2rem;
	background: rgba(255, 255, 255, 0.04);
	border: 1px solid var(--card-border);
	border-radius: 30px;
	font-size: 0.85rem;
	color: var(--text-muted);
	margin-bottom: 1.5rem;
}

.hero-tag .dot {
	width: 8px;
	height: 8px;
	background-color: var(--status-green);
	border-radius: 50%;
	box-shadow: 0 0 8px var(--status-green);
}

.hero h1 {
	font-size: 3.2rem;
	font-weight: 800;
	line-height: 1.25;
	margin-bottom: 1.2rem;
	letter-spacing: -1px;
}

.hero h1 span {
	background: linear-gradient(135deg, #ffffff 40%, var(--accent-cyan));
	-webkit-background-clip: text;
	background-clip: text;
	-webkit-text-fill-color: transparent;
}

.hero p {
	font-size: 1.15rem;
	color: var(--text-muted);
	margin-bottom: 2.5rem;
	word-break: keep-all;
}

/* Dashboard Preview Container */
.dashboard-container {
	max-width: 1000px;
	margin: 0 auto 5rem;
	padding: 0 1rem;
}

.wallet-card {
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: 20px;
	padding: 2rem;
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
}

.wallet-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding-bottom: 1.5rem;
	border-bottom: 1px solid var(--card-border);
	margin-bottom: 1rem;
}

.address-box {
	display: flex;
	align-items: center;
	gap: 10px;
	background: rgba(0, 0, 0, 0.3);
	padding: 0.5rem 1rem;
	border-radius: 8px;
	border: 1px solid var(--card-border);
	font-size: 0.9rem;
	color: var(--text-muted);
	text-decoration: none;
}

.address-box:link,
.address-box:visited,
.address-box:hover,
.address-box:active {
	text-decoration: none;
}

.copy-btn {
	background: none;
	border: none;
	color: var(--accent-cyan);
	cursor: pointer;
	font-size: 0.8rem;
}

.balance-main {
	display: grid;
	grid-auto-columns: min-content;
	grid-template-columns: repeat(2, 1fr); /* 4개의 컬럼을 동일한 비율(1fr)로 분할 */
	margin-bottom: 2rem;
}

.balance-label {
	font-size: 0.85rem;
	color: var(--text-muted);
	margin-bottom: 0.4rem;
	align-items: self-end;
}

.balance-value {
	font-size: 1.8rem;
	font-weight: 800;
	letter-spacing: -1px;
	display: flex;
	align-items: baseline;
	flex-direction: row-reverse;
	gap: 10px;
}

.balance-symbol {
	font-size: 1rem;
	color: var(--accent-cyan);
}

.balance-small-symbol {
	font-size: 0.75rem;
	color: var(--accent-cyan);
}

.action-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
	margin-bottom: 2.5rem;
}

.action-btn {
	background: rgba(255, 255, 255, 0.03);
	border: 1px solid var(--card-border);
	padding: 1rem;
	border-radius: 12px;
	color: var(--text-main);
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	font-weight: 600;
	font-size: 0.9rem;
}

.action-btn:hover {
	background: rgba(255, 255, 255, 0.08);
	border-color: rgba(255, 255, 255, 0.2);
	transform: translateY(-2px);
}

.action-icon {
	font-size: 1.4rem;
}

/* Asset Status List */
.asset-section h3 {
	font-size: 1.1rem;
	margin-bottom: 1rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
}

.asset-item {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1.2rem;
	background: rgba(0, 0, 0, 0.25);
	border: 1px solid var(--card-border);
	border-radius: 12px;
	margin-bottom: 0.8rem;
}

.asset-info {
	display: flex;
	align-items: center;
	gap: 12px;
}

.asset-icon {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	background: linear-gradient(135deg, var(--accent-cyan), var(--accent-purple));
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	color: #fff;
	font-size: 0.9rem;
}

.asset-names .name {
	color: var(--text-empasis, #f8fabc);
	font-weight: 700;
	font-size: 1rem;
}

.asset-names .tag {
	font-size: 0.8rem;
	color: var(--text-muted);
}

.asset-values {
	text-align: right;
}

.asset-values .amount {
	font-weight: 700;
	font-size: 1.05rem;
}

.asset-values .status {
	font-size: 0.8rem;
	color: var(--status-green);
}

.lockup-asset-item[role="button"] {
	cursor: pointer;
}

.lockup-asset-item[role="button"]:hover,
.lockup-asset-item[role="button"]:focus-visible {
	background: rgba(255, 255, 255, 0.05);
	outline: 1px solid var(--accent-cyan);
	outline-offset: 2px;
}

.lockup-asset-item .asset-icon,
.lockup-asset-item .asset-names .name,
.lockup-asset-item .asset-names .tag,
.lockup-asset-item .asset-values .amount,
.lockup-asset-item .asset-values .status,
.lockup-asset-item .balance-small-symbol {
	color: #718096;
}

.exchange-link,
.exchange-link:link,
.exchange-link:visited,
.exchange-link:hover,
.exchange-link:active {
	width: 100%;
	margin-top: 0.75rem;
	min-height: 48px;
	padding: 0.75rem 1rem;
	border: 1px solid rgba(121, 40, 202, 0.55);
	border-radius: 10px;
	background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
	color: #fff;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 0.6rem;
	font-weight: 700;
	text-decoration: none;
	box-shadow: 0 4px 20px rgba(121, 40, 202, 0.28);
	transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.exchange-link:hover {
	border-color: rgba(0, 242, 254, 0.75);
	box-shadow: 0 6px 25px rgba(121, 40, 202, 0.42);
	transform: translateY(-2px);
}

.exchange-link:active {
	transform: translateY(0);
}

.exchange-link:focus-visible {
	outline: 2px solid var(--accent-cyan);
	outline-offset: 3px;
}

/* Key Features Section */
.features-section {
	max-width: 1000px;
	margin: 0 auto 5rem;
	padding: 0 1rem;
}

.features-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 1.5rem;
	margin-top: 2rem;
}

.feature-card {
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: 16px;
	padding: 1.8rem;
	display: grid;
	grid-template-columns: 48px minmax(0, 1fr);
	column-gap: 1rem;
	align-items: center;
	-webkit-backdrop-filter: blur(10px);
	backdrop-filter: blur(10px);
}

.feature-icon {
	width: 48px;
	height: 48px;
	background: rgba(0, 242, 254, 0.1);
	border: 1px solid rgba(0, 242, 254, 0.2);
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 1.3rem;
	margin-bottom: 0;
	color: var(--accent-cyan);
}

.feature-card h4 {
	font-size: 1.1rem;
	margin-bottom: 0;
}

.feature-card p {
	grid-column: 1 / -1;
	margin-top: 0.75rem;
	font-size: 0.9rem;
	color: var(--text-muted);
	line-height: 1.5;
}

/* Footer */
footer {
	border-top: 1px solid var(--card-border);
	padding: 3rem 6% 2rem;
	color: var(--text-muted);
	font-size: 0.85rem;
	background: rgba(8, 11, 17, 0.95);
}

.footer-container {
	max-width: 1000px;
	margin: 0 auto;
	display: flex;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 2rem;
	margin-bottom: 2rem;
}

.footer-info p {
	margin-top: 0.5rem;
	max-width: 320px;
}

.footer-nav {
	display: flex;
	gap: 3rem;
}

.footer-nav-col h5 {
	color: var(--text-main);
	margin-bottom: 1rem;
	font-size: 0.9rem;
}

.footer-nav-col ul {
	list-style: none;
}

.footer-nav-col li {
	margin-bottom: 0.5rem;
}

.footer-nav-col a {
	color: var(--text-muted);
	text-decoration: none;
	transition: color 0.2s;
}

.footer-nav-col a:hover {
	color: var(--text-main);
}

.footer-bottom {
	max-width: 1000px;
	margin: 0 auto;
	padding-top: 1.5rem;
	border-top: 1px solid var(--card-border);
	text-align: center;
}

.mobile {
	display: none;
}

/* Modal & Interactive UI */
.modal-overlay {
	display: none;
	position: fixed;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
	background: rgba(0, 0, 0, 0.75);
	-webkit-backdrop-filter: blur(8px);
	backdrop-filter: blur(8px);
	z-index: 1000;
	align-items: center;
	justify-content: center;
}

.modal-overlay.active {
	display: flex;
}

.modal-card {
	background: var(--card-bg);
	border: 1px solid var(--card-border);
	border-radius: 20px;
	padding: 2rem;
	width: 90%;
	max-width: 420px;
	box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6);
}

.modal-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
}

.modal-header h3 {
	font-size: 1.25rem;
	color: var(--text-main);
}

.close-btn {
	background: none;
	border: none;
	color: var(--text-muted);
	font-size: 1.5rem;
	cursor: pointer;
}

.input-group {
	margin-bottom: 1.5rem;
}

.input-group label {
	display: block;
	font-size: 0.85rem;
	color: var(--text-muted);
	margin-bottom: 0.5rem;
}

.input-wrapper {
	display: flex;
	align-items: center;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid var(--card-border);
	border-radius: 10px;
	padding: 0.75rem 1rem;
}

.input-wrapper input {
	background: none;
	border: none;
	color: #fff;
	font-size: 1.2rem;
	font-weight: 700;
	width: 100%;
	outline: none;
}

.input-wrapper input::placeholder {
	color: rgba(255, 255, 255, 0.2);
}

.input-wrapper .symbol {
	color: var(--accent-cyan);
	font-weight: 700;
	margin-left: 0.5rem;
}

.input-hint {
	font-size: 0.75rem;
	color: #f87171;
	margin-top: 0.4rem;
	display: none;
}

.btn-submit {
	width: 100%;
	background: linear-gradient(135deg, var(--accent-purple), var(--accent-blue));
	color: #fff;
	border: none;
	padding: 0.9rem;
	border-radius: 10px;
	font-size: 1rem;
	font-weight: 700;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-submit:hover {
	opacity: 0.9;
	transform: translateY(-1px);
}

/* Scan & QR General Components */
.scan-container {
	max-width: 500px;
	margin: 3rem auto;
	padding: 0 1rem;
}

.scan-card {
	background: var(--card-bg, rgba(20, 26, 38, 0.7));
	border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
	border-radius: 20px;
	padding: 2rem;
	text-align: center;
	-webkit-backdrop-filter: blur(16px);
	backdrop-filter: blur(16px);
}

.amount-badge {
	display: inline-block;
	background: rgba(0, 242, 254, 0.15);
	color: var(--accent-cyan, #00f2fe);
	border: 1px solid rgba(0, 242, 254, 0.3);
	padding: 0.4rem 1rem;
	border-radius: 20px;
	font-weight: 700;
	font-size: 1.1rem;
	margin-bottom: 1.5rem;
}

#reader {
	width: 100%;
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
	background: #000;
}

/* 라이브러리 기본 내장 버튼/선택창 강제 숨김 */
#reader button,
#reader select {
	display: none !important;
}

.result-box {
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
	border-radius: 10px;
	padding: 1rem;
	font-size: 0.9rem;
	word-break: break-all;
	color: var(--text-muted, #94a3b8);
}

.result-box strong {
	color: var(--text-main, #f8fafc);
}

.btn-back {
	display: inline-block;
	margin-top: 1.5rem;
	color: var(--text-muted, #94a3b8);
	text-decoration: none;
	font-size: 0.9rem;
}

.btn-back:hover {
	color: var(--text-main, #f8fafc);
}

/* 수령 페이지 전용 QR 오버레이 레이아웃 */
.qr-container-box {
	position: relative;
	width: 260px;
	height: 260px;
	margin: 0 auto 1.5rem auto;
	background: #ffffff;
	padding: 12px;
	border-radius: 16px;
	box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
}

#qrcode-target img,
#qrcode-target canvas {
	width: 100% !important;
	height: 100% !important;
	border-radius: 6px;
}

/* 중앙 Nexcent 오버레이 배지 */
.qr-center-badge {
	position: absolute;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
	width: 58px;
	height: 58px;
	background: #141a26;
	border: 3px solid #080b11;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 800;
	font-size: 0.72rem;
	color: var(--accent-cyan, #00f2fe);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
	pointer-events: none;
	-webkit-user-select: none;
	user-select: none;
}

.qr-center-badge img {
	width: 100%;
	height: 100%;
	object-fit: contain;
	border-radius: 50%;
}

.address-display-box {
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid var(--card-border, rgba(255, 255, 255, 0.08));
	border-radius: 12px;
	padding: 0.8rem 1rem;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	font-size: 0.9rem;
	margin-bottom: 1rem;
}

#wallet-address {
	min-width: 0;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

#copy-address-area {
	cursor: pointer;
}

#copy-address-area:focus-visible {
	outline: 2px solid var(--accent-cyan);
	outline-offset: 2px;
}

.copy-btn-large {
	background: linear-gradient(135deg, var(--accent-purple, #7928ca), var(--accent-blue, #2563eb));
	color: #fff;
	border: none;
	padding: 0.5rem 1rem;
	border-radius: 8px;
	font-size: 0.85rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: opacity 0.2s;
}

.copy-btn-large:hover {
	opacity: 0.9;
}

/* 중복확인 버튼 및 인라인 입력창 스타일 */
.input-wrapper-btn {
	display: flex;
	align-items: center;
	gap: 8px;
	background: rgba(0, 0, 0, 0.3);
	border: 1px solid var(--card-border);
	border-radius: 10px;
	padding: 0.4rem 0.5rem 0.4rem 1rem;
}

.input-wrapper-btn input {
	background: none;
	border: none;
	color: #fff;
	font-size: 1rem;
	width: 100%;
	outline: none;
}

.btn-inline-check {
	background: rgba(255, 255, 255, 0.1);
	border: 1px solid var(--card-border);
	color: var(--accent-cyan);
	padding: 0.5rem 0.8rem;
	border-radius: 8px;
	font-size: 0.8rem;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.2s;
}

.btn-inline-check:hover {
	background: rgba(0, 242, 254, 0.15);
}

.btn-submit:disabled {
	background: rgba(255, 255, 255, 0.1);
	color: var(--text-muted);
	cursor: not-allowed;
	transform: none !important;
	opacity: 0.6;
}

@media (max-width: 768px) {
	.wallet-card {
		padding: 1.25rem;
	}

	.scan-card {
		padding: 1.25rem;
	}

	.hero h1 {
		font-size: 2.2rem;
	}

	.logo-badge {
		display: none;
	}

	.tag {
		display: none;
	}

	.asset-icon {
		display: none;
	}

	.action-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	header {
		flex-direction: column;
	}

	nav {
		display: none;
	}

	.balance-main {
		display: flex;
		flex-direction: column;
	}

	.glow-top {
		width: 100%;
	}

	.desktop {
		display: none !important; 
	}

	.mobile {
		display: block;
	}
}

.wallet-empty-state {
	padding: 1rem;
	color: var(--text-muted);
	text-align: center;
}

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

.message-modal-actions .btn-submit[hidden] {
	display: none;
}

.message-modal-actions .btn-submit {
	flex: 1;
}
