@charset "UTF-8";

* {
	margin: 0;
	padding: 0;
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.container {
  max-width: 100% !important;
}

body {
	background-color: #191820;
	color: #ffffff;
}

.header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 1rem 2rem;
	background-color: #1f1f2c;
}

.logo {
	color: #ffffff;
	font-size: 1.5rem;
	font-weight: bold;
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.logo-circle {
	width: 24px;
	height: 24px;
	background-color: #6137e9;
	border-radius: 50%;
}

.nav-links {
	display: flex;
	gap: 2rem;
}

.nav-links a {
	color: #ffffff;
	text-decoration: none;
}

.sidebar {
	width: 250px;
	padding: 1.5rem;
	background-color: #1f1f2c;
}

.title {
	font-size: 1.5rem;
	margin-bottom: 1.5rem;
}

.tags {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 2rem;
}

.tag {
	background-color: rgba(255, 255, 255, 0.1);
	padding: 0.5rem 1rem;
	border-radius: 20px;
	font-size: 0.875rem;
}

.search-bar {
	display: flex;
	margin-bottom: 2rem;
}

.search-bar input {
	flex: 1;
	padding: 0.75rem;
	background-color: #1f1f2c;
	border: none;
	border-radius: 4px;
	color: #ffffff;
}

.video-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
	gap: 1rem;
}

.video-card {
	background-color: #1f1f2c;
	border-radius: 8px;
	overflow: hidden;
}

.video-card:hover {
	cursor: pointer;
}

.video-thumbnail {
	width: 100%;
	aspect-ratio: 16/9;
	background-color: #33333e;
}

.video-info {
	padding: 1rem;
}

.category-list {
	list-style: none;
}

.category-list li {
	padding: 0.5rem 0;
	color: #6f757d;
	cursor: pointer;
}

.category-title {
	color: #ffffff;
	font-weight: 500;
	margin: 1rem 0;
}

/* 예비용 */
.card {
	position: relative;
	width: 320px;
	height: 224px;
	border-radius: 12px;
	overflow: hidden;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	font-family: sans-serif;
}

.thumbnail {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.info {
	position: absolute;
	bottom: 0;
	width: 100%;
	padding: 12px;
	background: linear-gradient(to top, rgba(0, 0, 0, 0.7), transparent);
	color: white;
}

.title {
	margin: 0;
	font-size: 16px;
	font-weight: bold;
}

.author {
	margin: 4px 0 8px;
	font-size: 13px;
	opacity: 0.8;
}

.icons {
	display: flex;
	justify-content: flex-end;
	gap: 12px;
}

.icon {
	display: flex;
	align-items: center;
	font-size: 14px;
	gap: 4px;
}

.icon img {
	width: 16px;
	height: 16px;
}

.heart {
	color: #f87171; /* 연한 빨강 */
}

.audio-card {
	display: flex;
	align-items: center;
	justify-content: space-between;
	background-color: #1d1d2b;
	padding: 12px 16px;
	border-radius: 12px;
	margin-bottom: 12px;
	box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.audio-left {
	flex-shrink: 0;
}

.play-btn {
	width: 36px;
	height: 36px;
	border-radius: 50%;
	background: #444;
	color: white;
	border: none;
	font-size: 16px;
	cursor: pointer;
}

.audio-middle {
	flex: 1;
	margin: 0 16px;
	height: 64px;
}

.audio-right {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 6px;
	font-size: 14px;
	color: #bbb;
}

.icon {
	cursor: pointer;
}

.template-card {
	border-radius: 12px;
	display: flex;
	position: relative;
	overflow: hidden;
	flex-direction: column;
	height: 18rem;
}

.template-card:hover .overlay {
	backdrop-filter: blur(0px);
	-webkit-backdrop-filter: blur(0px);
}

.template-image img {
	transition-duration: 0.3s;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.template-card:hover .template-image img {
	scale: 1.1;
}

.template-image video {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.template-image {
	width: 100%;
	height: 100%;
}

.content_wrap {
	display: flex;
	position: absolute;
	bottom: 0;
	z-index: 2;
	color: white;
	padding: 0.5rem 1.1rem;
	width: 100%;
	flex-direction: row;
	justify-content: space-between;
	height: 5.2rem;
}

.overlay {
	position: absolute;
	inset: 0;
	background: rgba(0, 0, 0, 0.2);
	backdrop-filter: blur(4px);
	-webkit-backdrop-filter: blur(4px);
	z-index: 1;
	height: 6rem;
	top: 67%;
	transition-duration: 0.3s;
}

span.icon {
	margin-left: 0.7rem;
}

span.icon_wrap span {
	display: flex;
	flex-direction: column;
	align-content: center;
	flex-wrap: wrap;
}

span.icon_wrap {
	display: flex;
	align-items: flex-end;
}

.template-info {
	padding: 12px;
	display: flex;
	flex-direction: column;
	justify-content: space-between;
	background-color: rgba(255, 255, 255, 0.1);
	flex-grow: 1;
}

.template-details {
	height: 100%;
}

.template-title {
	display: inline-block;
	font-size: 1.1rem;
	font-weight: 600;
	line-height: 1.1em;
	color: #ffffff;
	margin-bottom: 0.5rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 300px;
}

.template-writer {
	font-size: 0.8rem;
	color: #e9e9e9;
}

.template-creator {
	font-size: 12px;
	color: #d9d9d9;
}

.template-actions {
	display: flex;
	gap: 8px;
}

/*사이드바*/
/* 향상된 hidden 클래스와 부드러운 트랜지션 */
.hidden {
	opacity: 0;
	max-height: 0;
	overflow: hidden;
	transition: opacity 0.3s ease, max-height 0.3s ease;
}

/* Flexbox를 사용한 메인 콘텐츠 레이아웃 */
.main-content {
	display: flex;
	min-height: calc(100vh - 64px);
	transition: all 0.3s ease;
	position: relative;
}

/* 트랜지션이 적용된 사이드바 컨테이너 */
.categorywrap {
	transition: width 0.3s ease;
	width: 250px;
	flex-shrink: 0;
	margin-top: 45px;
}

/* 사이드바가 숨겨졌을 때 (flexdirection 클래스 적용) */
.categorywrap.flexdirection {
	width: 60px;
}

/* Flex grow를 사용한 콘텐츠 영역 */
.content {
	flex: 1;
	padding: 2rem;
	transition: all 0.3s ease;
}

/* 사이드바가 숨겨졌을 때 콘텐츠 영역 확장 */
.categorywrap.flexdirection+.content {
	margin-left: 60px;
}

/* 숨길 수 있는 요소들의 기본 스타일 */
.category-list, .category-title, .sidebar {
	opacity: 1;
	max-height: 1000px; /* 충분히 큰 값으로 설정 */
	overflow: hidden;
	transition: opacity 0.3s ease, max-height 0.3s ease;
}

/* 개선된 flexdirection 클래스 */
.flexdirection {
	position: absolute;
	left: 0;
	transition: left 0.3s ease;
	z-index: 10;
}

/* 향상된 사이드바 스타일링 */
.sidebar {
	position: fixed;
	top: 20;
	left: 20;
	width: 250px;
	padding: 1.5rem;
	background-color: #1f1f2c;
	border-radius: 0 10px 10px 0;
	box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
	transition: width 0.3s ease, padding 0.3s ease;
	z-index: 0;
}

/* 사이드바가 숨겨졌을 때 */
.categorywrap.flexdirection .sidebar {
	width: 60px;
	padding: 1.5rem 0;
}

/* 개선된 카테고리 리스트 스타일링 */
.category-list {
	list-style: none;
	overflow-y: auto;
	max-height: calc(100vh - 200px);
}

.category-list::-webkit-scrollbar {
	width: 5px;
}

.category-list::-webkit-scrollbar-thumb {
	background-color: #6137e9;
	border-radius: 5px;
}

.category-list li {
	padding: 0.5rem 0;
	color: #6f757d;
	cursor: pointer;
	transition: color 0.2s ease;
}

.category-list li:hover {
	color: #ffffff;
}

/* 개선된 카테고리 제목 */
.category-title {
	color: #ffffff;
	font-weight: 500;
	margin: 1rem 0;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* 토글 버튼의 고정 위치 */
#CategoriesViewButton {
	position: fixed;
	top: 80px;
	left: 20px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
	cursor: pointer;
	padding: 10px;
	transition: transform 0.2s ease, background-color 0.2s ease;
	border-radius: 8px;
	background-color: #1f1f2c;
	z-index: 1000;
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
	width: 45px;
	height: 45px;
}

#CategoriesViewButton:hover {
	background-color: rgba(255, 255, 255, 0.1);
	transform: scale(1.05);
}

/* 반응형 템플릿 그리드 - 사이드바 상태와 관계없이 3개 항목 유지 */
.template-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 30px;
	cursor: pointer;
	transition: all 0.3s ease;
}

/* 템플릿 카드의 종횡비 유지 */
.template-card {
	border-radius: 12px;
	display: flex;
	position: relative;
	overflow: hidden;
	flex-direction: column;
	height: 18rem;
	transition: all 0.3s ease;
}

/* 작은 화면에 대한 반응형 조정 */
@media ( max-width : 1920px) {
	.template-grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

@media ( max-width : 1400px) {
	.template-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media ( max-width : 768px) {
	.template-grid {
		grid-template-columns: repeat(1, 1fr);
	}
	#CategoriesViewButton {
		top: 70px;
		left: 10px;
	}
}


