/* 팝업모달 2025.12.29 전정주 */
:root {
		--modal-bg: rgba(0, 0, 0, 0.85);
		--card-bg: #ffffff;
		--accent: #e74c3c;
		--info: #3498db;
		--text-muted: #666;
}

/* Modal Overlay - Flexbox for Centering */
#multiModalOverlay {
		position: fixed;
		top: 0; left: 0;
		width: 100%; height: 100%;
		background: var(--modal-bg);
		z-index: 10000;
		display: none;
		overflow-y: auto;
		/* Center elements vertically and horizontally */
		display: none; /* jQuery fadeIn will change this to block, so we use flex in JS */
		align-items: center;
		justify-content: center;
		padding: 40px 20px;
		box-sizing: border-box;
}

/* Inner container for scrollable centered content */
.modal-wrapper {
		width: 100%;
		max-width: 1200px;
		margin: auto; /* Important for vertical centering in flex */
		display: flex;
		flex-direction: column;
		gap: 20px;
}

/* Controls */
.modal-master-controls {
		display: flex;
		justify-content: flex-end;
		gap: 12px;
}

.btn-master {
		padding: 10px 20px;
		border-radius: 8px;
		font-size: 14px;
		font-weight: 600;
		cursor: pointer;
		border: 1px solid rgba(255,255,255,0.3);
		background: rgba(255,255,255,0.1);
		color: white;
		transition: all 0.2s;
}

.btn-master:hover {
		background: white;
		color: black;
}

.btn-master.highlight {
		background: var(--info);
		border-color: var(--info);
		color: white;
}

/* Grid */
.modal-grid {
		display: grid;
		grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
		gap: 24px;
		justify-content: center;
}

/* Card */
.modal-card {
		background: var(--card-bg);
		border-radius: 16px;
		overflow: hidden;
		display: flex;
		flex-direction: column;
		box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
		animation: scaleIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes scaleIn {
		from { opacity: 0; transform: scale(0.9); }
		to { opacity: 1; transform: scale(1); }
}

.media-box {
		position: relative;
		width: 100%;
		padding-top: 56.25%; /* 16:9 */
		background: #111;
}

.media-box iframe,
.media-box img {
		position: absolute;
		top: 0; left: 0;
		width: 100%; height: 100%;
		object-fit: cover;
		border: none;
}

.image-link-wrapper {
		display: block;
		width: 100%;
		height: 100%;
		cursor: pointer;
}

.image-link-wrapper::after {
		content: '상세보기';
		position: absolute;
		top: 50%; left: 50%;
		transform: translate(-50%, -50%);
		background: rgba(0,0,0,0.8);
		color: white;
		padding: 10px 20px;
		border-radius: 30px;
		font-size: 12px;
		letter-spacing: 1px;
		opacity: 0;
		transition: opacity 0.3s;
}

.image-link-wrapper:hover::after {
		opacity: 1;
}

/* Footer */
.card-footer {
		padding: 16px;
		display: flex;
		justify-content: space-between;
		align-items: center;
		background: #fafafa;
		border-top: 1px solid #eee;
}

.btn-check {
		font-size: 13px;
		color: var(--text-muted);
		cursor: pointer;
		background: none;
		border: none;
		display: flex;
		align-items: center;
		gap: 6px;
}

.btn-check:hover { color: #000; }

.btn-close {
		padding: 8px 16px;
		background: #1f2937;
		color: white;
		border: none;
		border-radius: 8px;
		font-size: 13px;
		font-weight: 500;
		cursor: pointer;
}

.btn-close:hover { background: #374151; }

/* Demo Background UI */
.main-ui {
		height: 100vh;
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
		text-align: center;
		color: #333;
}
