/* 전역 변수 설정 */
:root {
    --bg-main: #f8fafc;
    --card-bg: #ffffff;
    --primary-green: #10b981; 
    --dark-green: #059669;
    --light-green: #ecfdf5;
    --dark-slate: #1e293b;
    --text-gray: #64748b;
    --border-light: #e2e8f0;
	--accent-green: #9cd440;
	--version-title-blue: #4C8BF5;	
}

/* 1. 패딩 누적으로 가로 초과 방지 */
*, *::before, *::after {
    box-sizing: border-box;
}

/* body 기본 스타일 */
body {
    font-family: 'Pretendard', -apple-system, sans-serif;
    color: var(--dark-slate);
    margin: 0;
    padding: 50px 20px; 
    display: flex;
    justify-content: center;
    align-items: flex-start; 
    position: relative;
    overflow-x: hidden;
    min-height: 100vh;
    background-color: white;
}

/* 배경 레이어: 스레이트 블루 그라데이션 */
body::before {
    content: '';
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -3;
    background: linear-gradient(180deg, #537B9B 0%, #3E607A 100%);
}
/* 별무리(점) 제거: CPU 점유율 방지 */
body::after {
    display: none;
}

/* 별 설정: 파랑 배경 가독성 최적화 및 GPU 가속 적용 */
.shooting-star {
    position: fixed;
    top: 0;
    width: 2.5px;
    height: 2.5px;
    /* 파랑 배경과 완벽히 대비되는 불투명 흰색 */
    background: #ffffff; 
    border-radius: 50%;
    /* 흰색 글로우와 배경색(#0088ff) 글로우를 겹쳐서 밝게함 */
    box-shadow: 0 0 10px 1px rgba(255, 255, 255, 0.9), 
                0 0 18px 3px rgba(0, 136, 255, 0.7);
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0); 
    animation: animate-star 4s linear infinite;
    z-index: -1;
    opacity: 0;
}

/* 별 꼬리 최적화 */
.shooting-star::before {
    content: '';
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 200px;
    height: 1px;
    /* 꼬리 시작점도 흰색으로 시작하여 파란색 투명으로 사라지게 함 */
    background: linear-gradient(90deg, #ffffff 0%, rgba(0, 136, 255, 0.6) 50%, transparent 100%);
}

/* 애니메이션 통합 및 최적화 (30% 이후 연산 중지) */
@keyframes animate-star {
    0% { 
        transform: rotate(315deg) translate3d(500px, 0, 0); 
        opacity: 0; 
    }
    1% { opacity: 1; }
    30% { 
        transform: rotate(315deg) translate3d(-2000px, 0, 0); 
        opacity: 0; 
    }
    100% { 
        transform: rotate(315deg) translate3d(-2000px, 0, 0); 
        opacity: 0; 
    }
}

/* 별 개별 위치 설정 */
.shooting-star:nth-child(1) { top: 0; right: -10%; animation-delay: 0s; animation-duration: 10s; }
.shooting-star:nth-child(2) { top: -5%; right: 10%; animation-delay: 2.5s; animation-duration: 14s; }
.shooting-star:nth-child(3) { top: 10%; right: -20%; animation-delay: 5s; animation-duration: 12s; }
.shooting-star:nth-child(4) { top: 0; right: 35%; animation-delay: 8s; animation-duration: 11s; }
.shooting-star:nth-child(5) { top: 5%; right: -5%; animation-delay: 1.5s; animation-duration: 16s; }
.shooting-star:nth-child(6) { top: 20%; right: -15%; animation-delay: 11s; animation-duration: 13s; }
.shooting-star:nth-child(7) { top: 0; right: 20%; animation-delay: 4s; animation-duration: 18s; }
.shooting-star:nth-child(8) { top: -5%; right: 55%; animation-delay: 14s; animation-duration: 15s; }

/* 메인 레이아웃: 좌측, 중앙, 우측 방명록까지 총 3열 그리드로 확장 */
.main-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr 1.1fr;
    gap: 25px;
    max-width: 1550px;
    width: 100%;
    position: relative;
    z-index: 1;
    margin-bottom: 10px; 
}

.container, .info-panel {
    background: var(--card-bg, #ffffff);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 20px 25px; 
    border-radius: 3px;
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.03); 
    border: 1.5px solid rgba(203, 213, 225, 0.8);
}

.container { text-align: center; }

/* 최신 버전 배지: 민트 배경과 진한 녹색 글자 */
.version-badge {
    display: inline-block;
    padding: 6px 16px;
    background: #ecfdf5; 
    color: #059669;      
    border-radius: 100px;
    font-weight: 700;
    font-size: 0.82rem;
    margin-bottom: 12px;
    border: 1px solid rgba(16, 185, 129, 0.2);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* 메인 타이틀 검정 적용 */
.main-title {
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #34495E;
	letter-spacing: 1px;
	text-transform: uppercase;
    text-shadow: 0 0 2px rgba(76, 139, 245, 0.4); /* 백라이트 효과 */	
}
/*  파스텔 파랑 */
.main-title span {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--version-title-blue);
    letter-spacing: 1px;
    text-transform: uppercase;
    text-shadow: 0 0 2px rgba(76, 139, 245, 0.4); /* 백라이트 효과 */
}

.update-date {
    color: var(--text-gray);
    font-size: 0.9rem;
    margin-bottom: 25px;
}

.titlemsg {
    /* 폰트 스타일 정의 */
    color: #2c3e50;     
    font-size: 1.1rem;      
    font-weight: 500;     
    letter-spacing: -0.02em;     
    
    /* 하이라이트 박스 스타일 정의 */
    background-color: #f0f4f8; /* 파스텔톤 블루 배경 */
    border-left: 4px solid var(--accent-green); /* 왼쪽에 프로그램 메인 포인트 컬러바(그린색) 표시 */
    padding: 10px 14px; /* 박스 내부 여백 */
    border-radius: 3px; 
    
    /* 레이아웃 여백 */
    margin-top: 10px;
    margin-bottom: 24px; 
    display: inline-block; 
}

.download-area {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 25px;
}

/* 공통 버튼 스타일 */
.btn {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 25px;
    text-decoration: none;
    border-radius: 3px;
    transition: all 0.3s ease;
}

/* 설치 버전 버튼: 녹색 배경 및 입체 그림자 */
.btn-setup {
    background: var(--primary-green);
    color: white;
    box-shadow: none;
    position: relative;
    z-index: 2; 
}

.btn-setup:hover { 
    background: var(--dark-green); 
    transform: translateY(-2px); 
    box-shadow: none;
}

/* 포터블 버튼: 군청색 유리 질감 스타일 */
.btn-portable { 
    background: rgba(30, 41, 59, 0.55); 
    color: #ffffff;      
    border: 1px solid rgba(255, 255, 255, 0.12);
    box-shadow: none;
}

/* 포터블 버튼 내부 카운트 배지 */
.btn-portable .count-badge {
    background: rgba(255, 255, 255, 0.12);
    color: #ffffff;
    opacity: 0.8;
}

.btn-portable:hover { 
    background: rgba(51, 65, 85, 0.7); 
    color: #ffffff;      
    transform: translateY(-2px);
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* 버튼 텍스트 레이아웃 */
.btn-text b { font-size: 1.15rem; display: block; text-align: left; }
.btn-text span { font-size: 0.75rem; opacity: 0.7; display: block; text-align: left; margin-top: 3px; }

/* 다운로드 카운트 배지 공통 스타일 */
.count-badge {
    background: rgba(255, 255, 255, 0.15);
    padding: 5px 10px;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
}

/* 미리보기 스크린샷 이미지 효과 */
.preview-img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    margin-top: 20px;
    transition: all 0.5s;
}

.section-label {
    font-size: 0.75rem;
    font-weight: 700;
    color: #334155; 
    letter-spacing: 0.03em; 
    text-transform: uppercase; 
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.section-label::after {
    content: '';
    flex: 1;
    height: 1px;
    background: #e2e8f0; 
    margin-left: 12px;
}

/* PC용 기본 스타일: 메인 기능 설명 */
.feature-text {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--dark-slate);
    line-height: 1.5;
    margin-bottom: 6px;
    word-break: keep-all; 
}

/* 상세 사양 리스트 */
.feature-list {
    font-size: 0.8rem;
    line-height: 1.7;
    margin-bottom: 20px;
}
.feature-item { display: flex; justify-content: space-between; margin-bottom: 6px; }
.feature-item b { color: var(--text-gray); font-weight: 600; }

/* 패치 노트 스크롤 박스 최적화 - Specification과 같은 마진 부여 */
.patch-box {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    padding: 6px 0px;
    border-radius: 6px;
    font-size: 0.72rem; 
    max-height: 350px;
    overflow-y: auto;
    color: var(--text-gray);
    line-height: 1.5;
    margin-top: -6px;
}

/* 패치 노트 내부의 개별 항목 정렬 */
.patch-box div {
    margin-bottom: 6px;
    line-height: 1.7;
}
.patch-box div:last-child {
    margin-bottom: 0;
}

/* 하단 footer 영역 */
.footer {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid #f1f5f9;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* 방문자 수 태그: 민트톤 가독성 */
.visit-tag {
    background: rgba(16, 185, 129, 0.1); 
    padding: 4px 12px;
    border-radius: 3px;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--primary-green); 
    border: 1px solid rgba(16, 185, 129, 0.2);
    letter-spacing: 0.5px;
}

/* VC++ 런타임 다운로드 링크 버튼 */
.runtime-btn {
    font-size: 0.75rem;
    color: #94a3b8;
    text-decoration: none;
    border: 1px solid #e2e8f0;
    padding: 2px 6px;
    border-radius: 3px;
}

/* ==========================================================================
   방명록(Guestbook) 전용 스타일 컴포넌트 
   ========================================================================== */
.guestbook-panel {
    display: flex;
    flex-direction: column;
}

.guestbook-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 20px;
}

/* 입력 필드 공통 */
.guest-input-name, .guest-input-content {
    width: 100%;
    box-sizing: border-box;
    font-family: inherit;
    font-size: 0.85rem;
    border: 1px solid var(--border-light);
    border-radius: 6px;
    padding: 10px 14px;
    background: #f8fafc;
    color: var(--dark-slate);
    transition: all 0.2s ease;
}

.guest-input-name:focus, .guest-input-content:focus {
    outline: none;
    border-color: var(--primary-green);
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15);
}

.guest-input-content {
    height: 75px;
    resize: none;
}

/* 방명록 등록 버튼 */
.guest-submit-btn {
    font-family: inherit;
    font-size: 0.88rem;
    font-weight: 700;
    background: var(--primary-green);
    color: #ffffff;
    border: none;
    border-radius: 3px;
    padding: 12px;
    cursor: pointer;
    box-shadow: none;
    transition: all 0.2s ease;
}

.guest-submit-btn:hover {
	filter: brightness(0.90);
    box-shadow: none;
}

/* 방명록 목록 피드 영역 (스크롤바 내장) */
.guestbook-list {
    flex: 1;
    max-height: 620px;
    overflow-y: auto;
    padding-right: 4px;
}

/* 방명록 개별 글 아이템 */
.guest-item {
    background: #f8fafc;
    border: 1px solid #f1f5f9;
    border-radius: 6px;
    padding: 12px 16px;
    margin-bottom: 10px;
	line-height: 1.6;
}

.guest-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 6px;
}

.guest-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--dark-slate);
}

.guest-date {
    font-size: 0.72rem;
    color: #94a3b8;
}

.guest-content {
    font-size: 0.82rem;
    line-height: 1.7;
    color: #475569;
    word-break: break-all;
}

/* 스크롤바 커스텀 스타일 (패치노트 및 방명록 피드 공통) */
.patch-box::-webkit-scrollbar, .guestbook-list::-webkit-scrollbar {
    width: 6px;
}
.patch-box::-webkit-scrollbar-track, .guestbook-list::-webkit-scrollbar-track {
    background: transparent;
}
.patch-box::-webkit-scrollbar-thumb, .guestbook-list::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.3);
    border-radius: 10px;
}
.patch-box::-webkit-scrollbar-thumb:hover, .guestbook-list::-webkit-scrollbar-thumb:hover {
    background: rgba(148, 163, 184, 0.5);
}

/* --- 모바일 및 반응형 최적화 (1300px / 1000px 이하 화면) --- */
@media (max-width: 1300px) {
    .main-wrapper {
        grid-template-columns: 1fr 1fr; /* 방명록이 너무 좁아지지 않도록 2열 배치로 전환 */
    }
}

@media (max-width: 1000px) {
    body { 
        padding: 15px 12px; 
        display: flex;
        justify-content: center; /* 자식 요소들을 가로 정중앙 배치 */
        align-items: flex-start;
    }
	
    .feature-text {
        font-size: 0.8rem;
        line-height: 1.4;
        margin-bottom: 4px;
    }

    /* 그리드를 완전한 세로 1열 구조로 변경 및 전체 폭 확보 */
    .main-wrapper { 
        grid-template-columns: 1fr; 
        gap: 20px;
        width: 100%;
        max-width: 100%;
    }

    /* 패딩 내부 축소 및 유연한 정렬 보장 */
    .container, .info-panel { 
        padding: 25px 16px; 
        width: 100%;
        max-width: 100%;
    }
    
    .main-title { font-size: 1.6rem; }
    .feature-list { font-size: 0.82rem; }

    /* 상세 사양 품목 모바일 좁은 가독성 개선 */
    .feature-item {
        display: flex;
        justify-content: space-between; 
        gap: 8px; 
        margin-bottom: 4px;
    }

    .feature-item b { flex-shrink: 0; min-width: fit-content; }
    .feature-item span {
        flex: 1;
        text-align: right; 
        overflow: hidden;
        text-overflow: ellipsis; 
        white-space: nowrap;
    }

    /* 모바일 환경 릴리즈 노트 여백 고정 */
    .patch-box {
        margin-top: -6px;
    }

    /* 모바일방명록 높이 제한 조절 */
    .guestbook-list {
        max-height: 350px;
    }

    /* 모바일에서는 별 숨김 */
    .shooting-star { display: none; }
}

/* ------------------------------ 시계 -------------------------------------- */  
.uptime-clock-aligner {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100%;
  margin: 0 auto;
  text-align: center;
  background-color: transparent;
  padding: 15px 0;
  box-sizing: border-box;
}

.uptime-clock-wrapper {
  display: inline-flex;
  background: #1e2b37;
  border-radius: 3px;
  padding: 12px 25px;
  box-sizing: border-box;
  margin: 0 auto;
  border: 1px solid rgba(156, 212, 64, 0.1);
  box-shadow: 
    0 2px 6px rgba(15, 23, 30, 0.25),
    0 1px 2px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
  perspective: 400px;
}

.uptime-clock-wrapper .clock-container {
  text-align: center;
  width: 100%;
}

.uptime-clock-wrapper .clock-title {
  font-size: 10px;
  color: #94a3b8;
  letter-spacing: 2.5px;
  margin-bottom: 8px;
  text-transform: uppercase;
  font-family: 'Share Tech Mono', sans-serif;
  font-weight: 700;
}

.uptime-clock-wrapper .digital-clock {
  font-size: 24px;
  color: var(--accent-green, #9cd440);
  font-family: 'Share Tech Mono', monospace;
  letter-spacing: 1px;
  text-shadow: none;
  display: flex;
  align-items: center;
  justify-content: center;
}

.uptime-clock-wrapper .num {
  display: inline-block;
  min-width: 2.1ch;
  width: auto;
  padding: 0 1px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

.uptime-clock-wrapper .unit {
  font-size: 12px;
  color: #94a3b8;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  margin-left: 2px;
  margin-right: 10px;
  text-shadow: none;
}

.uptime-clock-wrapper .unit:last-child {
  margin-right: 0;
}
/* ------------------------------ 시계 -------------------------------------- */
  
  
/* 로딩 애니메이션 */
@keyframes btn-spinner {
    to { transform: rotate(360deg); }
}

/* 배지 영역 기준점 설정 */
.count-badge {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* 로딩 중 배지 설정 */
.btn.is-loading .count-badge {
    pointer-events: none;
}

/* 로딩 중 배지 내부 숫자 투명화 */
.btn.is-loading .count-badge {
    color: transparent !important;
}

/* 배지 중앙에 스피너 배치 */
.btn.is-loading .count-badge::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 14px;
    height: 14px;
    margin-top: -7px;
    margin-left: -7px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: btn-spinner 0.6s linear infinite;
}

</style>