*{
	box-sizing:border-box;
}

html, body{
	margin:0;
	padding:0;
}

body{
	font-family:Pretendard, sans-serif;
	background:
		radial-gradient(circle at top left, rgba(79,124,255,0.14), transparent 28%),
		radial-gradient(circle at top right, rgba(255,255,255,0.05), transparent 20%),
		#0f1115;
	color:#fff;
	min-height:100vh;
}

/* =========================
TOPBAR
========================= */

.topbar{
	position:sticky;
	top:0;
	z-index:20;
	padding:14px 20px;
	background:rgba(10,12,16,0.72);
	backdrop-filter:blur(12px);
	border-bottom:1px solid rgba(255,255,255,0.06);
	display:flex;
	justify-content:space-between;
	align-items:center;
}

.topbar .left,
.topbar .right{
	display:flex;
	gap:10px;
	align-items:center;
}

.add_btn,
.admin_btn{
	cursor:pointer;
	padding:10px 14px;
	border-radius:10px;
	font-size:14px;
	transition:0.2s;
	user-select:none;
}

.add_btn{
	background:#4f7cff;
	color:#fff;
	box-shadow:0 6px 18px rgba(79,124,255,0.28);
}

.add_btn:hover{
	background:#3d68ea;
	transform:translateY(-1px);
}

.admin_btn{
	background:rgba(255,255,255,0.08);
	border:1px solid rgba(255,255,255,0.08);
	color:#fff;
}

.admin_btn:hover{
	background:rgba(255,255,255,0.16);
}

/* =========================
GRID
========================= */

.grid{
	display:grid;
	grid-template-columns:repeat(auto-fill, minmax(260px, 1fr));
	gap:20px;
	padding:20px;
	max-width:1280px;
	margin:0 auto;
}

/* =========================
CARD
========================= */

.card{
	position:relative;
	overflow:hidden;
	border-radius:18px;
	background:linear-gradient(180deg, rgba(31,35,43,0.95), rgba(18,21,27,0.96));
	border:1px solid rgba(255,255,255,0.06);
	box-shadow:0 10px 30px rgba(0,0,0,0.28);
	transition:0.28s ease;
}

.card:hover{
	transform:translateY(-6px);
	box-shadow:0 18px 40px rgba(0,0,0,0.4);
	border-color:rgba(255,255,255,0.12);
}

.thumb{
	width:100%;
	aspect-ratio:5/4;
	background:#050608;
	display:flex;
	align-items:center;
	justify-content:center;
	overflow:hidden;
}

.thumb img{
	width:100%;
	height:100%;
	object-fit:contain;
	display:block;
	transition:transform 0.35s ease;
}

.card:hover .thumb img{
	transform:scale(1.04);
}

.card_body{
	padding:14px 14px 16px;
}

.title{
	font-size:16px;
	font-weight:700;
	line-height:1.45;
	word-break:keep-all;
	margin-bottom:8px;
}

.desc{
	font-size:13px;
	line-height:1.6;
	color:rgba(255,255,255,0.72);
	word-break:keep-all;
	margin-bottom:14px;
	min-height:40px;
}

.card a{
	display:inline-flex;
	align-items:center;
	justify-content:center;
	min-height:40px;
	padding:10px 14px;
	border-radius:10px;
	background:#4f7cff;
	color:#fff;
	font-size:13px;
	font-weight:600;
	text-decoration:none;
	transition:0.2s;
}

.card a:hover{
	background:#3d68ea;
}

/* =========================
ADMIN AREA
========================= */

.admin_area{
	position:absolute;
	top:10px;
	right:10px;
	z-index:3;
}

.admin_area button{
	border:0;
	background:rgba(255,77,77,0.95);
	color:#fff;
	padding:8px 11px;
	border-radius:9px;
	cursor:pointer;
	font-size:12px;
	font-weight:700;
	box-shadow:0 4px 12px rgba(0,0,0,0.24);
}

.admin_area button:hover{
	background:#ff2f2f;
}

/* =========================
LAYER
========================= */

.layer{
	position:fixed;
	top:0;
	left:0;
	width:100%;
	height:100%;
	padding:20px;
	background:rgba(0,0,0,0.76);
	display:flex;
	align-items:center;
	justify-content:center;
	z-index:100;
}

.box{
	width:100%;
	background:#fff;
	color:#111;
	border-radius:18px;
	padding:20px;
	box-shadow:0 20px 60px rgba(0,0,0,0.35);
}

.small_box{
	max-width:400px;
}

.write_box{
	max-width:520px;
}

.layer_title{
	font-size:18px;
	font-weight:700;
	margin-bottom:14px;
}

.box input,
.box textarea{
	width:100%;
	border:1px solid #d8dbe3;
	border-radius:10px;
	padding:12px 13px;
	font-size:14px;
	margin-bottom:10px;
	background:#fff;
	color:#111;
}

.box textarea{
	min-height:120px;
	resize:vertical;
}

.box input:focus,
.box textarea:focus{
	outline:none;
	border-color:#4f7cff;
	box-shadow:0 0 0 3px rgba(79,124,255,0.12);
}

.btn_row{
	display:flex;
	gap:10px;
	margin-top:6px;
}

.box button{
	flex:1;
	border:0;
	border-radius:10px;
	padding:12px 14px;
	background:#4f7cff;
	color:#fff;
	font-size:14px;
	font-weight:700;
	cursor:pointer;
	transition:0.2s;
}

.box button:hover{
	background:#3d68ea;
}

.box .line_btn{
	background:#eef2ff;
	color:#3556c9;
}

.box .line_btn:hover{
	background:#dfe7ff;
}

/* =========================
PREVIEW / PASTE
========================= */

#preview_img{
	width:100%;
	display:none;
	margin-bottom:12px;
	border-radius:12px;
	background:#f4f6fa;
	border:1px solid #e5e8ef;
	object-fit:contain;
	max-height:280px;
}

#paste_box{
	width:100%;
	min-height:120px;
	border:2px dashed #ccd3df;
	border-radius:12px;
	display:flex;
	align-items:center;
	justify-content:center;
	text-align:center;
	color:#7f8794;
	font-size:14px;
	line-height:1.5;
	margin-bottom:10px;
	cursor:text;
	background:#fafbff;
	padding:14px;
}

#paste_box:focus{
	outline:none;
	border-color:#4f7cff;
	background:#fff;
	color:#222;
}

#paste_box.dragover{
	border-color:#4f7cff;
	background:#eef3ff;
}

/* =========================
ETC
========================= */

.hidden{
	display:none !important;
}

/* =========================
RESPONSIVE
========================= */

@media (max-width:700px){

	.topbar{
		padding:12px;
	}

	.grid{
		grid-template-columns:repeat(2, 1fr);
		gap:12px;
		padding:12px;
	}

	.title{
		font-size:14px;
	}

	.desc{
		font-size:12px;
		min-height:auto;
	}

	.add_btn,
	.admin_btn{
		padding:9px 12px;
		font-size:13px;
	}

	.layer{
		padding:12px;
	}

	.box{
		padding:16px;
	}
}

@media (max-width:480px){

	.grid{
		grid-template-columns:1fr 1fr;
	}

	.btn_row{
		flex-direction:column;
	}
}