.quiz-container {
	margin:0 auto;
	width: 100%;
	max-width: 500px;
	background-color: #B097FF;
	padding: 0px;
	box-sizing: border-box;
	text-align: center;
    height: 810px;
    position: relative;
    overflow: hidden;
}

/* 퀴즈 진행 화면 */
#quiz-screen {
	width: 100%;
	height: 100%;
	display: flex;
	flex-direction: column;
}


.q-image-area {
	width: 100%;
	height: auto; /* 이미지 비율대로 표시 */
	margin-bottom: 0;
	display: flex;
	align-items: flex-start;
	justify-content: center;
	flex-grow: 1;
}
.q-image-area img {
	width: 100%;
	height: auto;
	display: block; /* 이미지 하단 공백 제거 */
}

/* 버튼 영역 래퍼 (좌우 패딩 추가) */
.quiz-content-area {
	padding: 20px; /* 버튼 주변 여백 */
	background-color: #b197fc; /* 배경색 일치 */
}

.btn-area {
	display: flex;
	justify-content: space-between;
	gap: 15px;
	margin-bottom: 20px;
}

.btn-ox {
	flex: 1;
	background: none;
	border: none;
	padding: 0;
	cursor: pointer;
	transition: transform 0.1s;
}
.btn-ox:active {
	transform: scale(0.95);
}
.btn-ox img {
	width: 100%;
	height: auto;
	display: block;
}

/* [로딩 화면 스타일] */
#loading-screen {
	display: none;
	position: absolute;
	top: 50%;
	left: 0;
	width: 100%;
	transform: translateY(-50%);
	box-sizing: border-box;
	text-align: center;
}
.loading-gif {
	width: 200px;
	height: 200px;
}
.loading-gif1 {
	width: 80px;
	height: 80px;
}
.loading-text {
	color: #fff;
	font-size: 22px;
	font-weight: bold;
	line-height: 1.5;
	animation: blink 1.5s infinite;
}
@keyframes blink {
	0% { opacity: 1; }
	50% { opacity: 0.5; }
	100% { opacity: 1; }
}

/* 결과 화면 */
#result-screen {
	display: none;
	position: absolute; /* .quiz-container 내부에 위치 */
	top: 0;             /* 상단부터 시작하도록 변경 */
	left: 0;
	width: 100%;
	height: 100%;       /* 컨테이너 높이에 꽉 차게 설정 */
	box-sizing: border-box;
	padding: 40px 15px; /* 상하 여백 확보 */
	
	/* ▼ 스크롤을 위한 핵심 속성 ▼ */
	overflow-y: auto;   /* 내용이 넘치면 세로 스크롤 생성 */
	-webkit-overflow-scrolling: touch; /* 모바일에서 부드러운 관성 스크롤 지원 */
	
	/* [중요] 기존의 중앙 정렬 속성 제거 */
	transform: none;    
	z-index: 10;        /* 다른 요소들 위로 확실히 올라오도록 설정 */
}
/* 결과 카드 전체 래퍼 */
.result-card-wrap {
	width: 100%;
	max-width: 500px;
	margin: 0 auto 40px auto; /* 가로 중앙 정렬 및 1,2순위 카드 사이 하단 간격 확보 */
}

/* --- 1. 상단 영역 (이미지 + 텍스트 겹침) --- */
.card-top {
	position: relative; /* 텍스트 배치의 기준점 */
	width: 100%;
	line-height: 0; /* 이미지 하단 공백 제거 */
}
.card-top-bg {
	width: 100%;
	height: auto;
	display: block;
}
/* 겹쳐질 텍스트 컨테이너 (상단 이미지의 흰색 박스 영역에 위치) */
.card-top-text-area {
	position: absolute;
	top: 33%; /* 상단 이미지 높이의 중간 지점 */
	left: 0;
	width: 100%;
	text-align: center;
	/* 흰색 박스 안으로 텍스트 위치 조정 (시안에 맞춰 값 조절 필요) */
	transform: translateY(-10%); 
	padding: 0 20px; /* 좌우 텍스트 넘침 방지 */
	box-sizing: border-box;
}
/* '1순위' 배지 스타일 */
.rank-badge-box {
	display: inline-block;
	background-color: #4c6ef5; /* 파란색 계열 (시안 참고) */
	color: #fff;
	padding: 15px 25px;
	border-radius: 20px;
	font-size: 16px;
	font-weight: bold;
	margin-bottom: 10px; /* 계열명과의 간격 */
}
/* '{계열명}' 텍스트 스타일 */
.major-name-text {
	font-size: 30px;
	font-weight: bold;
	color: #000;
	/* 긴 계열명 줄바꿈 처리 */
	word-break: keep-all; 
	line-height: 1.2;
}

/* --- 2. 중간 영역 (배경 반복 + 내용) --- */
.card-mid {
	background: url('../images/result_02.png') repeat-y center top;
	background-size: 100% auto; /* 너비 꽉 차게, 높이 자동 반복 */
	width: 100%;
}
/* 실제 텍스트가 들어가는 컨테이너 (배경 안쪽으로 패딩 설정) */
.card-content {
	/* 상하좌우 패딩으로 텍스트가 배경 테두리 안에 들어가게 조정 */
	padding: 10px 35px 20px 35px; 
	text-align: left;
	color: #000;
	font-size: 15px;
	line-height: 1.7;
	word-break: keep-all;
}
.desc-paragraph {
	margin-bottom: 25px;
	white-space: pre-wrap; /* \n 줄바꿈 인식 */
}
.desc-link-area {
	margin-top: 15px;
	font-weight: bold;
	white-space: pre-wrap;
	line-height: 1.4;
}
.desc-link-area a {
	color: #0066cc; /* 링크 색상 */
	text-decoration: none;
	word-break: break-all; /* 긴 URL 줄바꿈 */
	display: inline-block; /* 터치 영역 확보 */
	margin-top: 5px;
}

/* --- 3. 하단 영역 (마무리 이미지) --- */
.card-bot {
	width: 100%;
	line-height: 0;
}
.card-bot-bg {
	width: 100%;
	height: auto;
	display: block;
	/* 중간 영역과의 미세한 틈 제거를 위해 살짝 올려줌 */
	margin-top: -1px; 
}

.btn-retry-img-link {
	display: block;
	width: 100%;
	max-width: 455px; /* 이미지 최대 너비 (460px) */
	text-align: center;
	cursor: pointer; /* 마우스 오버 시 손가락 모양 */
}

.result-link-btn-wrap {
	margin-top: 20px; /* 상단 안내 문구와의 간격 */
	display: inline-block;
	line-height: 0;
	padding: 0;
	border: none;
}

/* 링크(앵커) 태그 스타일 */
.result-link-btn {
	display: block;
	border: none;
	padding: 0;
	margin: 0;
}

/* 이미지 태그 스타일 */
.result-link-btn img {
	display: block;
	width: auto; 
	height: auto;
	border: none;
	max-width: 100%;
}