/* 기본 리셋 및 폰트 */
:root{
	font-family: Inter, Roboto, Arial, sans-serif;
	color:#202124;
	background:#fff;
}
html,body{height:100%;margin:0;padding:0}
body{
	background:#ffffff;
	color:#222;
}

/* 전체 레이아웃: 중앙 정렬 (구글 메인 스타일) */
.container{
	min-height:100vh;
	display:flex;
	flex-direction:column;
	align-items:center;
	justify-content:center;
	padding:40px 24px;
	max-width:100%;
	box-sizing:border-box;
}

/* 브랜드 (로고 + 타이틀) */
.brand{
	display:flex;
	flex-direction:column;
	align-items:center;
	gap:12px;
	margin-bottom:28px;
}
.brand .lead{margin:0;color:#666;font-size:15px}
.brand .title{font-weight:600;color:#111;margin:6px 0 0}

/* 로고: 약간 확대 (데스크탑/중간/모바일) */
.logo{
	height:30vh; /* 데스크탑 기본 크기 (조금 더 크게) */
	width:auto;
	display:block;
}
@media (max-width:1200px){
	.logo{height:180px}
}
@media (max-width:560px){
	.logo{height:112px}
	.container{padding:16px}
	.brand .title{font-size:18px}
	.brand .lead{font-size:13px}
}

/* 검색창 스타일 (중앙 큰 박스) */
.search-wrap {
	width:100%;
	max-width:800px;
	display:flex;
	flex-direction: column;
	align-items:center;
	gap:12px;
}
.search-box, /* .alias-box도 동일한 기본 스타일을 사용 */
.alias-box { /* 추가: .alias-box도 .search-box와 동일한 스타일 적용 */
	width:100%;
	display:flex;
	align-items:center;
	padding:10px 14px;
	border-radius:999px;
	border:1px solid #e6e6e6;
	box-shadow:0 2px 10px rgba(32,33,36,0.08);
	background:#fff;
	gap:12px;
	box-sizing:border-box;
	margin-top: 10px;
}
#url-input,
#alias-input { /* 추가: #alias-input에도 동일한 입력 필드 스타일 적용 */
	min-width: 450px;
	flex:1;
	border:none;
	outline:none;
	font-size:18px; /* 폰트 사이즈를 18px로 변경 */
	padding:8px;
	background:transparent;
}
#url-input::placeholder,
#alias-input::placeholder { /* 추가: #alias-input 플레이스홀더 스타일 적용 */
    color:#9aa0a6;
}
/* 변경: 컨테이너에 포커스 시 시각적 피드백 */
.search-box:focus-within,
.alias-box:focus-within { /* 추가: .alias-box에도 포커스 스타일 적용 */
    box-shadow:0 0 0 4px rgba(26,115,232,0.12);
    border-color: rgba(26,115,232,0.3); /* 포커스 시 테두리 색상 변경 (선택 사항) */
}
/* 개별 입력 필드의 기본 포커스 스타일 제거 */
#url-input:focus,
#alias-input:focus {
    outline: none;
}

#shorten-btn{
	display:inline-block;
	padding:10px 16px;
	border-radius:8px;
	border:none;
	background:#1a73e8;
	color:#fff;
	cursor:pointer;
	font-weight:600;
}
#shorten-btn.secondary{background:#f8f9fa;color:#202124;border:1px solid #dadce0}
#url-input:focus{box-shadow:0 0 0 4px rgba(26,115,232,0.12);border-radius:999px}

/* 검색박스 내 버튼을 단축 생성 버튼과 동일하게 보이도록 강제 */
.search-box .btn{
	/* 단축 생성 버튼과 동일한 높이/패딩/정렬 보정 */
	height:44px;
	padding:10px 16px;
	border-radius:8px;
	display:inline-flex;
	align-items:center;
	justify-content:center;
	border:none;
	box-sizing:border-box;
	background:#1a73e8;
	color:#fff;
	cursor:pointer;
	font-weight:600;
}

/* 노트 및 상태 메시지 중앙 정렬 */
.note{margin-top:8px;color:#555;font-size:13px;text-align:center}
.status{margin-top:10px;color:#444;font-size:13px;text-align:center}

/* 기타 (이전 리스트/카드 스타일 유지 가능) */
.list{margin-top:22px;max-width:720px}
.card{padding:12px;border-radius:8px;border:1px solid #eef2f7;background:#fff;display:flex;flex-direction:column;gap:6px;margin-bottom:10px}
.card a.short{color:#1a73e8;font-weight:600;text-decoration:none}
.card .meta{color:#666;font-size:13px}

/* 반응형: 작은 화면일 때 검색박스 축소 */
@media(max-width:560px){
	.search-box{padding:10px 12px}
	#url-input{font-size:16px}
	#shorten-btn{padding:8px 12px}
}

/* 상단 우측 고정 Presentation 링크 */
.top-right-doc {
    position: fixed;
    top: 16px;
    left: 80px; /* Intro 링크 옆으로 이동 (약 8px 간격) */
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background:#f8f9fa; /* 변경: 배경색 */
    color:#5f6368; /* 변경: 글자색 */
    border:1px solid #dadce0; /* 변경: 테두리색 */
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    box-shadow:0 1px 2px rgba(0,0,0,0.08); /* 변경: 그림자 */
}
.top-right-doc:hover,
.top-right-doc:focus {
    background:#e8eaed; /* 변경: 호버/포커스 배경색 */
    color:#202124; /* 추가: 호버/포커스 글자색 */
    outline: none;
    box-shadow:0 1px 3px rgba(0,0,0,0.12); /* 변경: 호버/포커스 그림자 */
}

/* 추가: 우측 상단 고정 Intro 링크 */
.top-right-intro {
    position: fixed;
    top: 16px;
    left: 16px; /* 왼쪽 상단으로 이동 */
    z-index: 1000;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 999px;
    background:#f8f9fa; /* 변경: 배경색 */
    color:#5f6368; /* 변경: 글자색 */
    border:1px solid #dadce0; /* 변경: 테두리색 */
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    box-shadow:0 1px 2px rgba(0,0,0,0.08); /* 변경: 그림자 */
}
.top-right-intro:hover,
.top-right-intro:focus {
    background:#e8eaed; /* 변경: 호버/포커스 배경색 */
    color:#202124; /* 추가: 호버/포커스 글자색 */
    outline: none;
    box-shadow:0 1px 3px rgba(0,0,0,0.12); /* 변경: 호버/포커스 그림자 */
}

/* 상단 우측 고정 링크 요소 */
.top-right-support{
	position:fixed;
	top:16px;
	right:16px; /* 가장 오른쪽 상단으로 이동 */
	left:unset; /* left 속성 제거 */
	z-index:1000;
	display:inline-flex;
	align-items:center;
	gap:8px;
	padding:8px 12px;
	border-radius:999px;
	background:#f8f9fa; /* 변경: 배경색 */
	color:#5f6368; /* 변경: 글자색 */
	border:1px solid #dadce0; /* 변경: 테두리색 */
	text-decoration:none;
	font-weight:600;
	font-size:13px;
	box-shadow:0 1px 2px rgba(0,0,0,0.08); /* 변경: 그림자 */
}
.top-right-support:hover,
.top-right-support:focus{
	background:#e8eaed; /* 변경: 호버/포커스 배경색 */
	color:#202124; /* 추가: 호버/포커스 글자색 */
	outline:none;
	box-shadow:0 1px 3px rgba(0,0,0,0.12); /* 변경: 호버/포커스 그림자 */
}

/* 변경: 로그인 위젯 컨테이너 (우측 상단 고정) */
.auth-widget {
    position: fixed;
    top: 16px;
    right: 100px; /* Support 버튼의 왼쪽에 배치 */
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 10px; /* 프로필 사진과 로그아웃 버튼 사이 간격 증가 */
}

/* 추가: 프로필 사진 스타일 */
.profile-picture {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid #fff;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

/* 추가: 프로필 사진 클릭 가능 스타일 */
.profile-picture.clickable {
    cursor: pointer;
    transition: transform 0.1s ease-in-out;
}
.profile-picture.clickable:hover {
    transform: scale(1.05);
}

/* 변경: 로그인/로그아웃 버튼 공통 스타일 (위치 지정 제거) */
.auth-button {
	/* position:fixed; 속성 제거 */
	display:inline-flex;
	align-items:center;
	padding:8px 12px;
	border-radius:999px;
	background:rgba(26,115,232,0.06);
	color:#1a73e8;
	border:1px solid rgba(26,115,232,0.14);
	text-decoration:none;
	font-weight:600;
	font-size:13px;
	box-shadow:0 2px 6px rgba(0,0,0,0.06);
    font-family: Inter, Roboto, Arial, sans-serif; /* 버튼에 폰트 적용 */
    cursor: pointer;
}
.auth-button:hover,
.auth-button:focus{
	background:rgba(26,115,232,0.12);
	outline:none;
	box-shadow:0 4px 12px rgba(26,115,232,0.12);
}

/* 추가: 모달 오버레이 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000; /* 다른 요소 위에 표시 */
}

/* 추가: 모달 내용 */
.modal-content {
    background: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    position: relative;
    text-align: center;
}
.modal-content h2 {
    margin-top: 0;
    font-size: 24px;
    color: #111;
}
.modal-content p {
    color: #555;
    font-size: 15px;
    margin-bottom: 20px;
}

/* 추가: 모달 내 섹션 간격 */
.api-key-section,
.user-id-section {
    margin-bottom: 20px;
}
.api-key-section h3,
.user-id-section h3 {
    font-size: 16px;
    color: #333;
    margin-top: 0;
    margin-bottom: 8px;
    text-align: left;
}

/* 추가: 모달 닫기 버튼 */
.modal-close-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 28px;
    cursor: pointer;
    color: #888;
    line-height: 1;
    padding: 0;
}
.modal-close-btn:hover {
    color: #333;
}

/* 추가: API 키 표시 영역 */
.api-key-display {
    background: #f0f4f8;
    border: 1px solid #e0e6ed;
    border-radius: 8px;
    padding: 12px 15px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 15px;
    word-break: break-all;
}
#display-api-key,
#display-unique-user-id { /* 추가: 고유 사용자 ID 표시 코드 스타일 */
    flex-grow: 1;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 14px;
    color: #333;
    text-align: left;
}

/* 추가: 모달 내 복사 버튼 (기존 .btn.primary 스타일 활용) */
.btn.small {
    padding: 8px 12px;
    font-size: 12px;
    height: auto; /* 작은 버튼에 맞게 높이 조정 */
}

/* 추가: 모달 메시지 */
.modal-message {
    font-size: 13px;
    color: #1a73e8;
    margin-top: -10px;
    min-height: 18px; /* 메시지 공간 확보 */
}

/* 숨김 클래스 */
.hidden{display:none !important}

/* 결과 박스 스타일 */
.result-box{
	width:100%;
	max-width:720px;
	padding:14px;
	border-radius:12px;
	background:#f7fbff;
	border:1px solid #e6f3ff;
	text-align:center;
	box-sizing:border-box;
}
.result-box a{color:#1a73e8;font-weight:600;text-decoration:none}

/* 통합: #shorten-btn 및 결과/복사/새로만들기 버튼을 동일한 스타일로 맞춤 */
#shorten-btn,
.btn.primary,
.search-box .btn,
.result-actions .btn {
	-webkit-appearance: none;
	appearance: none;
	background: #1a73e8;
	color: #fff;
	border: none;
	padding: 10px 16px;
	border-radius: 8px;
	cursor: pointer;
	font-weight: 600;
	font-size: 14px;
	line-height: 1;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	height: 44px; /* 일관된 높이 유지 */
	box-sizing: border-box;
	transition: background 120ms ease, box-shadow 120ms ease, transform 80ms ease;
}

#shorten-btn:hover,
.btn.primary:hover,
.search-box .btn:hover,
.result-actions .btn:hover {
	background: #1558c0;
}

#shorten-btn:active,
.btn.primary:active,
.search-box .btn:active,
.result-actions .btn:active {
	transform: translateY(1px);
}

#shorten-btn:focus,
.btn.primary:focus,
.search-box .btn:focus,
.result-actions .btn:focus {
	outline: none;
	box-shadow: 0 0 0 4px rgba(26,115,232,0.12);
}

/* secondary 버튼(새로 만들기 등)도 일관되게 보이도록 보정 */
.btn.secondary,
.search-box .btn.secondary,
.result-actions .btn.secondary {
	background: #f8f9fa;
	color: #202124;
	border: 1px solid #dadce0;
	padding: 10px 16px;
	height: 44px;
	border-radius: 8px;
	box-sizing: border-box;
}

/* 모바일에서 버튼 높이/배치 조정 */
@media (max-width:560px){
	#shorten-btn,
	.btn.primary,
	.btn.secondary,
	.search-box .btn,
	.result-actions .btn {
		height: auto;
		width: 100%;
		padding: 10px 12px;
	}
	.result-actions{flex-direction:column;width:100%}
}

/* result-inline 내부 버튼 간격/반응형 보정 */
.result-inline .btn{margin-left:6px}
@media (max-width:560px){
	.result-inline{flex-direction:column;align-items:stretch}
	.result-inline a{word-break:break-word}
	.result-inline .btn{margin-left:0;width:100%}
}

.service-toggle-btn {
	display: inline-flex;
	align-items: center;
	padding: 8px 12px;
	border-radius: 20px; /* 더 부드러운 라운딩 */
	background: #f8f9fa;
	color: #5f6368;
	border: 1px solid #dadce0;
	text-decoration: none;
	font-weight: 600;
	font-size: 14px; /* 가독성을 위해 폰트 크기 증가 */
	box-shadow: 0 1px 2px rgba(0,0,0,0.05);
	cursor: pointer;
	transition: all 0.2s ease-in-out; /* 부드러운 전환 효과 추가 */
}
.service-toggle-btn:hover,
.service-toggle-btn:focus {
	background: #e8eaed;
	color: #202124;
	outline: none;
	box-shadow: 0 2px 4px rgba(0,0,0,0.1);
	transform: scale(1.05); /* 호버 시 약간 확대되는 효과 */
}
.service-toggle-btn.active {
	background: #1a73e8; /* 활성 상태 배경색 강조 */
	color: #ffffff; /* 활성 상태 글자색 변경 */
	font-weight: 600;
	border-color: #1a73e8;
	box-shadow: 0 1px 3px rgba(26, 115, 232, 0.2);
	transform: scale(1.05);
}
/* 추가: 비디오 모달 관련 스타일 (선택자 수정) */
#video-modal.modal-overlay {
	background: rgba(0, 0, 0, 0.8);
	z-index: 1000;
}
#video-modal .modal-content {
	position: relative;
	background: #fff;
	padding: 0;
	margin: 0;
	border-radius: 8px;
	max-width: 90%;
	max-height: 80%;
	overflow: hidden;
	/* 기존 .modal-content 스타일 오버라이드 */
	box-shadow: none; 
	width: auto;
	text-align: left;
}
#video-modal .close-button {
	position: absolute;
	top: 10px;
	right: 10px;
	background: none;
	border: none;
	color: #333;
	font-size: 24px;
	cursor: pointer;
}
#video-container {
	width: 100%;
	height: 100%;
}