/* FaceFirst Analysis Page Styles */

/* 공유 버튼 스타일 */
.share-buttons {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	margin-bottom: 16px;
	flex-wrap: wrap;
}

.share-btn {
	padding: 10px 16px;
	border: 1px solid #dbdbdb;
	background: white;
	color: #262626;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 80px;
}

.share-btn:hover {
	background: #8134af;
	color: white;
	border-color: #8134af;
}

.share-btn img {
	width: 16px;
	height: 16px;
	vertical-align: middle;
	margin-right: 4px;
}

/* 모바일 공유 버튼 */
.share-mobile {
	background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af);
	color: white;
	border: none;
}

.share-mobile:hover {
	opacity: 0.9;
}

/* 카카오 버튼 */
.share-kakao {
	background: #FEE500;
	color: #000000;
	border: 1px solid #FEE500;
}

.share-kakao:hover {
	background: #FDD835;
	color: #000000;
	border-color: #FDD835;
}

/* 페이스북 버튼 */
.share-facebook {
	background: #1877F2;
	color: white;
	border: 1px solid #1877F2;
}

.share-facebook:hover {
	background: #166FE5;
	color: white;
	border-color: #166FE5;
}

/* X(트위터) 버튼 */
.share-x {
	background: #000000;
	color: white;
	border: 1px solid #000000;
}

.share-x:hover {
	background: #1a1a1a;
	color: white;
	border-color: #1a1a1a;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
	.share-buttons {
		gap: 6px;
		padding: 0 8px;
	}
	
	.share-btn {
		padding: 8px 12px;
		font-size: 12px;
		min-width: 70px;
	}
	
	.share-btn img {
		width: 14px;
		height: 14px;
	}
}

@media (max-width: 480px) {
	.share-buttons {
		flex-direction: column;
		width: 100%;
		padding: 0 16px;
	}
	
	.share-btn {
		width: 100%;
		padding: 12px;
	}
}

/* 헤더 스타일 */
.header {
	text-align: center;
	padding: 20px;
	margin-bottom: 20px;
}

.header h1 {
	font-size: 28px;
	font-weight: 300;
	margin-bottom: 8px;
	color: #262626;
}

.header p {
	font-size: 14px;
	color: #8e8e8e;
}

/* 카드 스타일 */
.card-header {
	padding: 14px 16px;
	border-bottom: 1px solid #efefef;
	display: flex;
	align-items: center;
	justify-content: space-between;
}

.card-content {
	padding: 16px;
}

/* 업로드 영역 */
.upload-area {
	border: 1px solid #dbdbdb;
	border-radius: 8px;
	padding: 60px 20px;
	text-align: center;
	cursor: pointer;
	transition: all 0.2s ease;
	background: #fafafa;
	position: relative;
}

.upload-area:hover {
	background: #f0f0f0;
	border-color: #c0c0c0;
}

.upload-area.dragover {
	background: linear-gradient(45deg, rgba(245, 133, 41, 0.1), rgba(221, 42, 123, 0.1));
	border-color: #dd2a7b;
}

.upload-icon {
	font-size: 48px;
	margin-bottom: 16px;
	background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.upload-text {
	font-size: 16px;
	color: #262626;
	margin-bottom: 4px;
	font-weight: 500;
}

.upload-subtext {
	font-size: 12px;
	color: #8e8e8e;
}

#imageInput {
	display: none;
}

/* 프리뷰 */
.preview-container {
	display: none;
}

.preview-wrapper {
	position: relative;
	background: #000;
	border-radius: 8px;
	overflow: hidden;
	margin-bottom: 16px;
}

.preview-image {
	width: 100%;
	height: auto;
	display: block;
	max-height: 500px;
	object-fit: contain;
	/* EXIF 오리엔테이션 자동 처리 */
	image-orientation: from-image;
}

/* 업로드된 이미지 섹션 */
.uploaded-image-section {
	display: none;
	background: #ffffff;
	border: 1px solid #dbdbdb;
	border-radius: 8px;
	margin-bottom: 20px;
	overflow: hidden;
	transition: all 0.3s ease;
	max-width: 614px;
	margin-left: auto;
	margin-right: auto;
}

.uploaded-image-section.show {
	display: block;
	animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.uploaded-image {
	width: 100%;
	height: auto;
	display: block;
	max-height: 600px;
	object-fit: contain;
	/* EXIF 오리엔테이션 자동 처리 - 모바일 세로 사진 방향 보정 */
	image-orientation: from-image;
	-webkit-image-orientation: from-image;
}

.remove-image-btn {
	position: absolute;
	top: 12px;
	right: 12px;
	background: rgba(0, 0, 0, 0.5);
	border: none;
	border-radius: 50%;
	width: 32px;
	height: 32px;
	cursor: pointer;
	color: white;
	font-size: 16px;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s;
}

.remove-image-btn:hover {
	background: rgba(0, 0, 0, 0.8);
	transform: scale(1.1);
}

/* 버튼 그룹 */
.button-group {
	display: flex;
	gap: 12px;
	margin-top: 16px;
}

/* 분석 버튼 */
.analyze-btn {
	background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4);
	color: white;
	border: none;
	padding: 12px 24px;
	font-size: 14px;
	font-weight: 600;
	border-radius: 8px;
	cursor: pointer;
	transition: all 0.2s ease;
	flex: 1;
	position: relative;
	overflow: hidden;
}

.analyze-btn:hover {
	opacity: 0.9;
	transform: translateY(-1px);
	box-shadow: 0 4px 15px rgba(221, 42, 123, 0.3);
}

.analyze-btn:active {
	transform: translateY(0);
}

.analyze-btn::after {
	content: '';
	position: absolute;
	top: 50%;
	left: 50%;
	width: 5px;
	height: 5px;
	background: rgba(255, 255, 255, 0.5);
	opacity: 0;
	border-radius: 100%;
	transform: scale(1, 1) translate(-50%);
	transform-origin: 50% 50%;
}

.analyze-btn:focus:not(:active)::after {
	animation: ripple 1s ease-out;
}

@keyframes ripple {
	0% {
		transform: scale(0, 0);
		opacity: 1;
	}
	20% {
		transform: scale(25, 25);
		opacity: 1;
	}
	100% {
		opacity: 0;
		transform: scale(40, 40);
	}
}

.analyze-btn:disabled {
	opacity: 0.5;
	cursor: not-allowed;
	transform: none;
}

/* 다시하기 버튼 컨테이너 - PC에서 main-card와 동일한 너비 */
.retry-btn-container {
	display: none;
	background: #ffffff;
	border: 1px solid #dbdbdb;
	border-radius: 8px;
	margin: 20px auto;
	overflow: visible;
	max-width: 614px;
	padding: 16px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.retry-btn-container.show {
	display: block !important;
}

.retry-btn-full {
	width: 100%;
	background: #ffffff;
	color: #262626;
	border: 1.5px solid #dbdbdb;
	border-radius: 8px;
	padding: 14px 24px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	margin-bottom: 0;
}

.retry-btn-full:hover {
	background: #fafafa;
	border-color: #8e8e8e;
	transform: translateY(-1px);
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.retry-btn-full:active {
	transform: translateY(0);
	box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
}

.retry-icon {
	font-size: 16px;
	display: inline-block;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.retry-btn-full:hover .retry-icon {
	transform: rotate(180deg);
}

/* 인스타그램 스타일 공유 섹션 */
.instagram-share-section {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #efefef;
}

.share-buttons-row {
	display: flex;
	gap: 8px;
	justify-content: stretch;
}

.insta-share-btn {
	flex: 1;
	padding: 12px 16px;
	border: none;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	position: relative;
	overflow: hidden;
}

.insta-share-btn::before {
	content: '';
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.3), transparent);
	transform: translateX(-100%);
	transition: transform 0.6s;
}

.insta-share-btn:hover::before {
	transform: translateX(100%);
}

.share-kakao-btn {
	background: #FEE500;
	color: #000000;
}

.share-kakao-btn:hover {
	background: #FDD835;
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(254, 229, 0, 0.4);
}

.share-kakao-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(254, 229, 0, 0.3);
}

.share-link-btn {
	background: linear-gradient(45deg, #833AB4, #C13584, #E1306C, #FD1D1D, #F77737);
	color: white;
}

.share-link-btn:hover {
	background: linear-gradient(45deg, #6a2c8f, #a02a6a, #b82659, #d91818, #d9622d);
	transform: translateY(-2px);
	box-shadow: 0 4px 12px rgba(193, 53, 132, 0.4);
}

.share-link-btn:active {
	transform: translateY(0);
	box-shadow: 0 2px 6px rgba(193, 53, 132, 0.3);
}

.share-icon {
	width: 18px;
	height: 18px;
	flex-shrink: 0;
}

.share-link-btn .share-icon {
	color: white;
}

/* 더보기 버튼 */
.more-share-toggle {
	width: 100%;
	margin-top: 8px;
	padding: 8px;
	background: transparent;
	border: none;
	color: #8e8e8e;
	font-size: 13px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 4px;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.more-share-toggle:hover {
	color: #262626;
}

.more-icon {
	width: 16px;
	height: 16px;
	transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.more-share-toggle.active .more-icon {
	transform: rotate(180deg);
}

/* 추가 공유 옵션 */
.more-share-options {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #efefef;
	transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.share-buttons-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 8px;
}

.insta-share-btn-small {
	aspect-ratio: 1;
	padding: 12px;
	background: #ffffff;
	border: 1.5px solid #dbdbdb;
	border-radius: 8px;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.insta-share-btn-small:hover {
	background: #fafafa;
	border-color: #8e8e8e;
	transform: scale(1.05);
}

.insta-share-btn-small:active {
	transform: scale(0.95);
}

.share-icon-small {
	width: 20px;
	height: 20px;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
	.retry-btn-container {
		max-width: 100%;
		border-radius: 0;
		border-left: none;
		border-right: none;
		padding: 12px;
	}
	
	.share-buttons-row {
		gap: 6px;
	}
	
	.insta-share-btn {
		font-size: 13px;
		padding: 10px 12px;
	}
	
	.share-icon {
		width: 16px;
		height: 16px;
	}
	
	.share-buttons-grid {
		grid-template-columns: repeat(4, 1fr);
		gap: 6px;
	}
	
	.insta-share-btn-small {
		padding: 10px;
	}
	
	.share-icon-small {
		width: 18px;
		height: 18px;
	}
}

@media (max-width: 375px) {
	.insta-share-btn span {
		font-size: 12px;
	}
	
	.share-icon {
		width: 14px;
		height: 14px;
	}
	
	.share-buttons-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

/* 로딩 */
.loading-container {
	display: none;
	text-align: center;
	padding: 60px 20px;
}

.loading-text {
	color: #262626;
	font-size: 16px;
	font-weight: 600;
	margin-bottom: 8px;
}

.loading-subtext {
	color: #8e8e8e;
	font-size: 13px;
	margin-bottom: 20px;
	animation: fadeInOut 2s ease-in-out infinite;
}

@keyframes fadeInOut {
	0%, 100% {
		opacity: 0.6;
	}
	50% {
		opacity: 1;
	}
}

.loading-progress {
	width: 200px;
	height: 4px;
	background: #efefef;
	border-radius: 4px;
	margin: 0 auto;
	overflow: hidden;
	position: relative;
}

.loading-progress-bar {
	height: 100%;
	background: linear-gradient(90deg, #f58529, #dd2a7b, #8134af, #515bd4);
	border-radius: 4px;
	animation: progressBar 3s ease-in-out infinite;
	position: absolute;
	left: -100%;
	width: 100%;
}

@keyframes progressBar {
	0% {
		left: -100%;
	}
	50% {
		left: 100%;
	}
	100% {
		left: -100%;
	}
}

/* 업로드된 이미지 섹션 - PC에서 main-card와 동일한 너비 */
.uploaded-image-section {
	display: none;
	background: #ffffff;
	border: 1px solid #dbdbdb;
	border-radius: 8px;
	margin-bottom: 20px;
	overflow: hidden;
	max-width: 614px;
	margin-left: auto;
	margin-right: auto;
}

.uploaded-image-section.show {
	display: block;
}

.uploaded-image {
	width: 100%;
	height: auto;
	display: block;
	max-height: 500px;
	object-fit: contain;
	image-orientation: from-image;
}

/* 결과 컨테이너 - PC에서 main-card와 동일한 너빔 */
.result-container {
	display: none;
	max-width: 614px;
	margin: 0 auto;
}

.result-header {
	padding: 16px;
	border-bottom: 1px solid #efefef;
	background: linear-gradient(45deg, rgba(245, 133, 41, 0.05), rgba(221, 42, 123, 0.05));
}

.result-title {
	font-size: 18px;
	font-weight: 600;
	color: #262626;
	display: flex;
	align-items: center;
	gap: 8px;
}

/* 점수 그리드 */
.score-grid {
	display: grid;
	grid-template-columns: repeat(5, 1fr);
	gap: 1px;
	background: #efefef;
	margin: 16px 0;
}

.score-card {
	background: white;
	padding: 20px;
	text-align: center;
}

.score-label {
	font-size: 12px;
	color: #8e8e8e;
	margin-bottom: 8px;
	text-transform: uppercase;
	letter-spacing: 0.5px;
}

.score-value {
	font-size: 32px;
	font-weight: 300;
	background: linear-gradient(45deg, #f58529, #dd2a7b);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	background-clip: text;
}

.score-bar {
	height: 3px;
	background: #efefef;
	border-radius: 3px;
	margin-top: 8px;
	overflow: hidden;
}

.score-fill {
	height: 100%;
	background: linear-gradient(45deg, #f58529, #dd2a7b);
	border-radius: 3px;
	transition: width 1s ease;
}

/* 결과 아이템 */
.result-item {
	padding: 16px;
	border-bottom: 1px solid #efefef;
}

.result-item:last-child {
	border-bottom: none;
}

.result-label {
	font-size: 14px;
	font-weight: 600;
	color: #262626;
	margin-bottom: 12px;
	display: flex;
	align-items: center;
	gap: 6px;
}

.result-value {
	color: #262626;
	line-height: 1.6;
	font-size: 14px;
}

/* 키워드 태그 */
.keyword-list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
}

.keyword-tag {
	background: #efefef;
	color: #262626;
	padding: 6px 12px;
	border-radius: 16px;
	font-size: 13px;
	font-weight: 500;
}

/* 긍정적 피드백 */
.positive-feedback {
	background: linear-gradient(135deg, #667eea15, #764ba215);
	color: #262626;
	padding: 20px;
	margin: 16px;
	border-radius: 8px;
	text-align: center;
	font-size: 14px;
	line-height: 1.6;
	border: 1px solid rgba(102, 126, 234, 0.1);
}

/* 공유 섹션 */
.share-section {
	padding: 16px;
	border-top: 1px solid #efefef;
	background: #fafafa;
}

.share-title {
	text-align: center;
	font-size: 14px;
	color: #262626;
	margin-bottom: 16px;
	font-weight: 600;
}

.share-buttons {
	display: flex;
	justify-content: center;
	flex-wrap: wrap;
	gap: 12px;
	align-items: center;
}

/* 링크 복사 버튼 */
.share-btn {
	padding: 12px 20px;
	border: 1px solid #dbdbdb;
	background: white;
	border-radius: 8px;
	cursor: pointer;
	font-size: 14px;
	transition: all 0.2s ease;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	font-weight: 500;
	color: #262626;
	text-decoration: none;
	-webkit-tap-highlight-color: transparent;
	touch-action: manipulation;
	user-select: none;
}

.share-btn:hover {
	background: #fafafa;
	border-color: #c0c0c0;
}

.share-copy {
	background: white;
	border: 2px solid #dbdbdb;
}

.share-copy:hover {
	background: #262626;
	border-color: #262626;
	color: white;
}

/* 모바일 공유 버튼 */
.share-mobile {
	background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af);
	color: white;
	border: none;
	font-weight: 600;
}

.share-mobile:hover {
	opacity: 0.9;
	background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af);
}

/* URL 입력 영역 */
.url-copy-section {
	margin-top: 16px;
}

.url-input-wrapper {
	display: flex;
	gap: 8px;
	align-items: center;
}

.url-input {
	flex: 1;
	padding: 10px 12px;
	border: 1px solid #dbdbdb;
	border-radius: 8px;
	font-size: 13px;
	color: #262626;
	background: #fafafa;
	outline: none;
}

.url-input:focus {
	border-color: #8134af;
	background: white;
}

.url-copy-btn {
	padding: 10px 20px;
	background: white;
	border: 1px solid #dbdbdb;
	border-radius: 8px;
	font-size: 13px;
	font-weight: 600;
	color: #262626;
	cursor: pointer;
	transition: all 0.2s ease;
	white-space: nowrap;
}

.url-copy-btn:hover {
	background: #262626;
	color: white;
	border-color: #262626;
}



.retry-btn-full {
	width: 100%;
	padding: 14px 24px;
	background: linear-gradient(45deg, #f58529, #dd2a7b, #8134af, #515bd4);
	color: white;
	border: none;
	border-radius: 8px;
	font-size: 15px;
	font-weight: 600;
	cursor: pointer;
	transition: all 0.3s ease;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	box-shadow: 0 4px 12px rgba(221, 42, 123, 0.2);
}

.retry-btn-full:hover {
	transform: translateY(-2px);
	box-shadow: 0 6px 16px rgba(221, 42, 123, 0.3);
	opacity: 0.95;
}

.retry-btn-full:active {
	transform: translateY(0);
}

.retry-icon {
	font-size: 18px;
	animation: rotate 2s linear infinite paused;
}

.retry-btn-full:hover .retry-icon {
	animation-play-state: running;
}

@keyframes rotate {
	from { transform: rotate(0deg); }
	to { transform: rotate(360deg); }
}

/* 사용량 정보 */
.usage-info {
	background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
	border: 1px solid #bae6fd;
	color: #0369a1;
	padding: 14px 16px;
	border-radius: 8px;
	margin-bottom: 16px;
	text-align: center;
	font-size: 14px;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	position: relative;
	overflow: hidden;
}

.usage-info::before {
	content: '✨';
	font-size: 16px;
	margin-right: 4px;
}

.usage-count {
	background: linear-gradient(45deg, #f58529, #dd2a7b);
	color: white;
	padding: 3px 10px;
	border-radius: 16px;
	font-weight: 700;
	font-size: 14px;
	display: inline-block;
	margin: 0 4px;
	box-shadow: 0 2px 4px rgba(221, 42, 123, 0.2);
	animation: pulse 2s infinite;
}

@keyframes pulse {
	0%, 100% {
		transform: scale(1);
	}
	50% {
		transform: scale(1.05);
	}
}

/* 사용량 경고 */
.usage-info.warning {
	background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
	border-color: #fbbf24;
	color: #92400e;
}

.usage-info.warning::before {
	content: '⚠️';
}

.usage-info.warning .usage-count {
	background: #dc2626;
	animation: shake 0.5s;
}

@keyframes shake {
	0%, 100% { transform: translateX(0); }
	25% { transform: translateX(-5px); }
	75% { transform: translateX(5px); }
}

/* 정보 카드 스타일 */
.info-cards {
	display: flex;
	flex-direction: column;
	gap: 12px;
	margin-top: 16px;
}

.info-card {
	padding: 12px;
	border-radius: 8px;
	display: flex;
	align-items: flex-start;
	gap: 12px;
}

.privacy-info {
	background: #f0f9ff;
	border: 1px solid #bae6fd;
}

.tips-info {
	background: #fefce8;
	border: 1px solid #fde68a;
}

.info-icon {
	font-size: 20px;
	flex-shrink: 0;
}

.info-content {
	flex: 1;
	min-width: 0;
}

.info-title {
	font-size: 13px;
	font-weight: 600;
	margin-bottom: 4px;
	color: #262626;
}

.info-text {
	font-size: 12px;
	color: #0369a1;
	line-height: 1.4;
	word-break: keep-all;
}

.info-tips {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 12px;
	color: #92400e;
	margin-top: 4px;
}

.tip-item {
	background: #fef3c7;
	padding: 3px 8px;
	border-radius: 12px;
	white-space: nowrap;
	font-weight: 500;
	display: inline-flex;
	align-items: center;
	gap: 3px;
}

.expand-btn {
	display: inline-block;
	margin-left: 8px;
	cursor: pointer;
	font-size: 10px;
	transition: transform 0.3s;
	user-select: none;
	background: none;
	border: none;
	padding: 0;
}

.expand-btn.expanded {
	transform: rotate(180deg);
}

.detailed-tips {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #fde68a;
}

.tip-detail {
	font-size: 12px;
	color: #78350f;
	line-height: 1.6;
}

.tip-detail strong {
	display: block;
	margin-bottom: 8px;
	color: #92400e;
}

.tip-detail ul {
	margin: 0;
	padding-left: 20px;
}

.tip-detail li {
	margin-bottom: 4px;
}

/* 히스토리 섹션 */
.history-section {
	margin-top: 30px;
	max-width: 614px;
	margin-left: auto;
	margin-right: auto;
}

.history-title {
	font-size: 16px;
	color: #262626;
	margin-bottom: 16px;
	font-weight: 600;
	padding: 0 16px;
}

.history-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 3px;
}

.history-item {
	aspect-ratio: 1;
	background: #fafafa;
	cursor: pointer;
	overflow: hidden;
	position: relative;
}

.history-item:hover .history-overlay {
	opacity: 1;
}

.history-image {
	width: 100%;
	height: 100%;
	object-fit: cover;
	image-orientation: from-image;
}

.history-overlay {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	bottom: 0;
	background: rgba(0, 0, 0, 0.3);
	display: flex;
	align-items: center;
	justify-content: center;
	opacity: 0;
	transition: opacity 0.2s;
}

.history-date {
	color: white;
	font-size: 12px;
	font-weight: 500;
}







/* 모바일 반응형 */
@media (max-width: 768px) {
	.container {
		padding: 20px 0;
	}
	
	.result-container {
		max-width: 100%;
	}

	/* 헤더 모바일 최적화 */
	.header {
		padding: 20px 15px;
		margin-bottom: 15px;
	}

	.header h1 {
		font-size: 24px;
		word-break: keep-all;
		line-height: 1.3;
	}

	.header p {
		font-size: 13px;
		word-break: keep-all;
		line-height: 1.4;
	}

	.info-card {
		padding: 10px;
		gap: 10px;
	}

	.info-icon {
		font-size: 18px;
	}

	.info-title {
		font-size: 12px;
	}

	.info-text {
		font-size: 11px;
		line-height: 1.5;
	}

	.info-tips {
		gap: 6px;
	}

	.tip-item {
		font-size: 11px;
		padding: 2px 6px;
	}

	.score-grid {
		grid-template-columns: repeat(2, 1fr) !important;
		gap: 0;
	}

	.score-card {
		border-bottom: 1px solid #efefef;
	}

	.score-card:last-child {
		border-bottom: none;
	}

	.history-grid {
		grid-template-columns: repeat(3, 1fr);
		gap: 1px;
	}
	
	.history-section {
		max-width: 100%;
	}

	.share-buttons {
		display: grid;
		grid-template-columns: 1fr 1fr;
		gap: 8px;
	}

	.share-btn {
		width: 100%;
		justify-content: center;
	}

	.footer-links {
		flex-direction: column;
		gap: 12px;
	}

	.button-group {
		flex-direction: column;
	}
}

/* 아주 작은 화면 */
@media (max-width: 375px) {
	/* 헤더 최적화 */
	.header {
		padding: 15px 12px;
		margin-bottom: 12px;
	}

	.header h1 {
		font-size: 20px;
		line-height: 1.3;
	}

	.header p {
		font-size: 12px;
		line-height: 1.4;
		padding: 0 5px;
	}

	.gradient-text {
		display: inline-block;
	}

	.info-cards {
		gap: 8px;
		margin-top: 12px;
	}

	.info-card {
		padding: 8px;
		gap: 8px;
	}

	.info-icon {
		font-size: 16px;
	}

	.info-tips {
		gap: 4px;
	}

	.tip-item {
		font-size: 10px;
		padding: 1px 5px;
	}

	.detailed-tips {
		display: none !important;
	}

	.expand-btn {
		display: none;
	}
}

/* 추가 분석 결과 컨테이너 */
#additionalAnalysisContainer {
	display: none;
	max-width: 614px;
	margin: 0 auto;
	padding: 0;
	box-sizing: border-box;
}

@media (max-width: 768px) {
	#additionalAnalysisContainer {
		padding: 0;
		max-width: 100%;
	}
	
	.uploaded-image-section {
		max-width: 100%;
		border-radius: 0;
		border-left: none;
		border-right: none;
	}
}

/* 공유 버튼 컨테이너 반응형 */
.share-buttons-container {
	display: flex;
	gap: 8px;
	margin-top: 12px;
}

.simple-share-btn {
	flex: 1;
	padding: 12px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 6px;
	transition: all 0.2s;
}

.simple-share-btn:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

@media (max-width: 480px) {
	.share-buttons-container {
		flex-direction: row !important;
		gap: 6px;
	}
	
	.simple-share-btn {
		flex: 1;
		padding: 10px 8px;
		font-size: 12px;
	}
	
	.simple-share-btn .share-icon {
		font-size: 14px;
	}
}

/* ECharts WordCloud 뇌 모양 스타일 */
#keywords {
	background: radial-gradient(ellipse at center, 
		rgba(255, 240, 245, 0.3) 0%, 
		rgba(255, 255, 255, 0) 70%);
	border-radius: 50%;
	box-shadow: inset 0 0 30px rgba(129, 52, 175, 0.05);
	position: relative;
}

#keywords::before {
	content: '';
	position: absolute;
	top: 10%;
	left: 50%;
	transform: translateX(-50%);
	width: 80%;
	height: 80%;
	background: radial-gradient(ellipse at center,
		rgba(255, 182, 193, 0.1) 0%,
		rgba(255, 255, 255, 0) 60%);
	border-radius: 50% 50% 45% 45% / 60% 60% 40% 40%;
	pointer-events: none;
	z-index: 0;
}

/* WordCloud 호버 효과 */
#keywords canvas {
	position: relative;
	z-index: 1;
}

/* WordCloud 이벤트 완전 비활성화 (v4.0) */
#keywords,
#keywords *,
#keywords canvas,
.keyword-cloud-container,
.keyword-cloud-container *,
.keyword-cloud-container canvas,
#tab-keywords-cloud,
#tab-keywords-cloud *,
#tab-keywords-cloud canvas {
	pointer-events: none !important;
	user-select: none !important;
	-webkit-user-select: none !important;
	-moz-user-select: none !important;
	-ms-user-select: none !important;
	cursor: default !important;
}

/* ECharts 컨테이너 이벤트 비활성화 */
[_echarts_instance_],
div[_echarts_instance_] *,
.echarts-for-react,
.echarts-for-react * {
	pointer-events: none !important;
	cursor: default !important;
}

/* 모바일 최적화 */
@media (max-width: 768px) {
	#keywords {
		height: 350px !important;
	}
}

@media (max-width: 480px) {
	#keywords {
		height: 300px !important;
	}
}