/* 기본 변수 및 설정 */
:root {
    --primary: #3B82F6;
    --primary-dark: #2563EB;
    --text-main: #1F2937;
    --text-sub: #4B5563;
    --bg-light: #F3F4F6;
    --white: #FFFFFF;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* 다크모드 시스템 설정 무시 */
    color-scheme: light;
}

/* html에도 overflow-x hidden 추가하여 가로 스크롤 방지 */
html, body { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Pretendard', 'Noto Sans KR', sans-serif; -webkit-tap-highlight-color: transparent; overflow-x: hidden; }
body { background-color: var(--white); color: var(--text-main); line-height: 1.5; word-break: keep-all; }

/* 네비게이션 */
.navbar { 
    display: flex; justify-content: center; padding: 16px 20px; 
    position: fixed; top: 0; left: 0; right: 0; 
    z-index: 100; background: rgba(255,255,255,0.95); backdrop-filter: blur(10px); 
    border-bottom: 1px solid rgba(0,0,0,0.05); transition: all 0.3s; 
}
.nav-container { display: flex; justify-content: space-between; align-items: center; width: 100%; max-width: 1200px; }
.logo { display: flex; align-items: center; gap: 8px; text-decoration: none; flex-shrink: 0; }
.logo img { height: 28px; width: auto; }
.logo-text { font-size: 20px; font-weight: 800; color: var(--text-main); letter-spacing: -0.5px; white-space: nowrap; }

.nav-buttons { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.btn-login { text-decoration: none; color: var(--text-sub); font-weight: 600; font-size: 15px; transition: color 0.2s; padding: 8px 4px; white-space: nowrap; }
.btn-login:hover { color: var(--primary); }
.btn-start { background-color: var(--text-main); color: white; padding: 10px 20px; border-radius: 12px; text-decoration: none; font-weight: 700; font-size: 14px; transition: all 0.2s; box-shadow: var(--shadow-sm); white-space: nowrap; }
.btn-start:active { transform: scale(0.96); }

/* 매뉴얼 버튼 스타일 */
#manual-btn {
    background: #EFF6FF;
    border: none;
    padding: 8px 14px;
    border-radius: 8px;
    margin-right: 0;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    font-family: 'Pretendard', 'Noto Sans KR', sans-serif;
    color: var(--primary);
    transition: all 0.2s;
    white-space: nowrap;
}
#manual-btn:hover { background: var(--primary); color: white; }

/* 히어로 섹션 */
.hero { display: flex; align-items: center; justify-content: space-between; max-width: 1200px; margin: 120px auto 80px; padding: 0 20px; gap: 40px; }
.hero-content { flex: 1; max-width: 580px; }
.hero-content h1 { font-size: 56px; font-weight: 900; line-height: 1.2; margin-bottom: 24px; color: var(--text-main); letter-spacing: -1px; }
.hero-content h1 .highlight { color: var(--primary); display: inline-block; position: relative; z-index: 1; }
.hero-content h1 .highlight::after { content: ''; position: absolute; bottom: 5px; left: 0; width: 100%; height: 15px; background: rgba(59, 130, 246, 0.2); z-index: -1; border-radius: 4px; }
.hero-content p { font-size: 19px; color: var(--text-sub); margin-bottom: 40px; line-height: 1.6; letter-spacing: -0.3px; }

.hero-btns { display: flex; gap: 15px; }
.btn-hero { display: inline-flex; justify-content: center; align-items: center; background-color: var(--primary); color: white; padding: 18px 48px; border-radius: 16px; text-decoration: none; font-weight: 700; font-size: 18px; transition: transform 0.2s, background-color 0.3s; box-shadow: 0 10px 25px -5px rgba(59, 130, 246, 0.4); }
.btn-hero:hover { background-color: var(--primary-dark); transform: translateY(-3px); }
.btn-hero:active { transform: scale(0.98); }

/* 히어로 이미지 (목업) */
.hero-image { flex: 1; display: flex; justify-content: flex-end; position: relative; perspective: 1000px; }
.mockup-card { width: 360px; background: white; border-radius: 28px; box-shadow: var(--shadow-lg); border: 8px solid var(--text-main); overflow: hidden; transform: rotateY(-10deg) rotateX(5deg); transition: transform 0.5s ease-out; }
.hero:hover .mockup-card { transform: rotateY(0deg) rotateX(0deg); }

.mockup-header { background: #f8fafc; padding: 16px; display: flex; gap: 8px; border-bottom: 1px solid #eee; }
.dot { width: 10px; height: 10px; border-radius: 50%; }
.red { background: #EF4444; } .yellow { background: #F59E0B; } .green { background: #10B981; }
.mockup-body { padding: 24px; background: #fff; }
.mock-row { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; padding: 14px; background: #F3F4F6; border-radius: 12px; transform: translateY(0); transition: 0.3s; }
.mock-row:hover { transform: translateY(-2px); box-shadow: var(--shadow-sm); }
.check-icon { color: var(--primary); font-size: 18px; }
.friend-row { background: #EFF6FF; border: 1px solid #DBEAFE; }
.badge { background: var(--primary); color: white; font-size: 11px; padding: 3px 8px; border-radius: 6px; font-weight: 800; }
.text { font-size: 15px; font-weight: 600; color: var(--text-main); }
.mock-comment { display: flex; align-items: center; gap: 10px; margin-top: 24px; animation: float 3s ease-in-out infinite; }
.avatar { width: 36px; height: 36px; background: #E5E7EB; border-radius: 50%; border: 2px solid white; box-shadow: var(--shadow-sm); }
.bubble { background: var(--text-main); color: white; padding: 10px 18px; border-radius: 20px 20px 20px 4px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-md); }

@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* 기능 섹션 */
.features { background: #FAFAFA; padding: 120px 20px; position: relative; }
.feature-container { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.feature-item { background: white; padding: 40px 32px; border-radius: 24px; transition: all 0.3s; border: 1px solid rgba(0,0,0,0.03); box-shadow: var(--shadow-sm); }
.feature-item:hover { transform: translateY(-8px); box-shadow: var(--shadow-lg); border-color: transparent; }
.icon-box { font-size: 36px; margin-bottom: 24px; background: var(--bg-light); width: 64px; height: 64px; display: flex; align-items: center; justify-content: center; border-radius: 18px; }
.feature-item h3 { font-size: 22px; font-weight: 800; margin-bottom: 12px; color: var(--text-main); }
.feature-item p { color: var(--text-sub); line-height: 1.6; font-size: 16px; word-break: keep-all; }

/* 쇼케이스 섹션 */
.showcase { padding: 120px 20px; background: white; }
.showcase-content { max-width: 1200px; margin: 0 auto; display: flex; align-items: center; gap: 80px; }
.showcase-text { flex: 1; }
.showcase-text h2 { font-size: 44px; font-weight: 900; line-height: 1.3; margin-bottom: 24px; color: var(--text-main); letter-spacing: -1px; }
.showcase-text p { font-size: 18px; color: var(--text-sub); line-height: 1.7; margin-bottom: 30px; }
.showcase-visual { flex: 1; display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.stat-card { background: white; padding: 28px; border-radius: 24px; box-shadow: var(--shadow-lg); display: flex; flex-direction: column; gap: 8px; border: 1px solid #f3f4f6; transition: transform 0.3s; }
.stat-card:hover { transform: translateY(-5px); }
.card-1 { grid-column: 1 / 3; background: linear-gradient(135deg, #ffffff 0%, #f9fafb 100%); }
.stat-card span { font-size: 15px; color: var(--text-sub); font-weight: 600; display: flex; align-items: center; gap: 6px; }
.stat-card strong { font-size: 32px; font-weight: 900; color: var(--primary); letter-spacing: -0.5px; }

/* CTA 섹션 */
.cta-section { padding: 120px 20px; text-align: center; background: linear-gradient(180deg, #FFFFFF 0%, #F3F4F6 100%); }
.cta-content { max-width: 700px; margin: 0 auto; }
.cta-content h2 { font-size: 40px; font-weight: 900; margin-bottom: 20px; color: var(--text-main); letter-spacing: -1px; }
.cta-content p { font-size: 18px; color: var(--text-sub); margin-bottom: 48px; line-height: 1.6; }
.btn-cta { display: inline-block; background-color: var(--text-main); color: white; padding: 20px 60px; border-radius: 50px; text-decoration: none; font-weight: 700; font-size: 18px; transition: all 0.3s; box-shadow: 0 15px 30px -5px rgba(0, 0, 0, 0.2); }
.btn-cta:hover { transform: scale(1.05); background-color: black; box-shadow: 0 20px 40px -5px rgba(0, 0, 0, 0.3); }

/* 푸터 */
footer { background: white; border-top: 1px solid #f3f4f6; padding: 60px 20px; }
.footer-content { max-width: 1200px; margin: 0 auto; text-align: center; display: flex; flex-direction: column; gap: 24px; align-items: center; }
.footer-logo { font-weight: 900; font-size: 20px; display: flex; align-items: center; gap: 10px; color: #d1d5db; }
.footer-logo img { height: 24px; filter: grayscale(100%); opacity: 0.5; }
.footer-links { display: flex; gap: 30px; }
.footer-links a { text-decoration: none; color: var(--text-sub); font-size: 14px; font-weight: 500; transition: color 0.2s; }
.footer-links a:hover { color: var(--primary); }
.footer-content p { color: #9CA3AF; font-size: 13px; }

/* === 모달 스타일 === */
.manual-modal {
    display: none;
    position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.5); 
    backdrop-filter: blur(8px); 
    overflow-y: auto;
    padding: 40px 20px;
    align-items: flex-start; justify-content: center;
    opacity: 0; animation: fadeIn 0.3s forwards;
}
@keyframes fadeIn { to { opacity: 1; } }

.modal-content {
    background-color: white; margin: 0 auto; padding: 50px; border-radius: 32px;
    max-width: 900px; width: 100%; position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    transform: translateY(20px); animation: slideUp 0.3s forwards 0.1s;
}
@keyframes slideUp { to { transform: translateY(0); } }

/* 모바일 모달 애니메이션 정의 */
@keyframes slideUpMobile { from { transform: translateY(100%); } to { transform: translateY(0); } }

.close-modal {
    position: absolute; top: 25px; right: 30px; 
    color: #9CA3AF; font-size: 36px; font-weight: 300; 
    cursor: pointer; transition: all 0.2s; 
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    border-radius: 50%; background: #F3F4F6;
}
.close-modal:hover { color: var(--text-main); background: #E5E7EB; transform: rotate(90deg); }

.modal-title { text-align: center; font-size: 32px; font-weight: 900; margin-bottom: 60px; color: var(--text-main); letter-spacing: -1px; }
.manual-section { margin-bottom: 60px; padding-bottom: 40px; border-bottom: 1px solid #f3f4f6; }
.manual-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0; }
.manual-section h3 { font-size: 24px; font-weight: 800; margin-bottom: 24px; color: var(--primary); display: flex; align-items: center; gap: 10px; }
.manual-section h3::before { content: ''; width: 6px; height: 24px; background: var(--primary); border-radius: 4px; display: inline-block; }
.manual-block { display: flex; gap: 50px; align-items: center; }
.manual-block.reverse { flex-direction: row-reverse; }
.manual-text { flex: 1; }
.manual-text p { margin-bottom: 24px; line-height: 1.7; color: var(--text-sub); font-size: 16px; }
.manual-text strong { display: block; color: var(--text-main); font-size: 19px; margin-bottom: 10px; letter-spacing: -0.5px; }
.manual-text b { color: var(--primary); font-weight: 800; }
.tip-box { background: #FFFBEB; color: #B45309; padding: 16px 20px; border-radius: 16px; font-size: 15px; font-weight: 600; margin-top: 20px; display: inline-block; border: 1px solid #FEF3C7; }
.manual-image { flex: 0 0 320px; border-radius: 24px; overflow: hidden; box-shadow: var(--shadow-md); border: 6px solid #f3f4f6; background: #f3f4f6; }
.manual-image img { width: 100%; height: auto; display: block; transition: transform 0.3s; }
.manual-image:hover img { transform: scale(1.03); }

/* ==========================================================================
   [모바일 반응형 최적화]
   ========================================================================== */
@media (max-width: 768px) {
    .navbar { padding: 10px 16px; }
    .logo-text { display: none; }
    .logo img { height: 26px; }
    .nav-buttons { gap: 6px; }
    
    #manual-btn { padding: 6px 10px; font-size: 13px; }
    .btn-login { font-size: 13px; padding: 6px 8px; }
    .btn-start { padding: 8px 14px; font-size: 13px; }

    .hero { flex-direction: column; text-align: center; margin-top: 90px; margin-bottom: 60px; padding: 0 24px; gap: 40px; }
    .hero-content { margin-bottom: 0; max-width: 100%; }
    .hero-content h1 { font-size: 34px; margin-bottom: 16px; word-break: keep-all; } 
    .hero-content p { font-size: 16px; margin-bottom: 32px; padding: 0 10px; }
    .hero-btns { flex-direction: column; width: 100%; }
    .btn-hero { width: 100%; padding: 16px; font-size: 16px; }
    
    .hero-image { width: 100%; justify-content: center; margin-top: 10px; }
    .mockup-card { width: 280px; border-width: 6px; transform: none !important; }
    .mockup-body { padding: 16px; }
    .mock-row { padding: 10px; gap: 10px; margin-bottom: 8px; }
    .text { font-size: 13px; }
    .mock-comment { margin-top: 16px; justify-content: center; }
    
    .features { padding: 60px 20px; }
    .feature-container { grid-template-columns: 1fr; gap: 20px; }
    .feature-item { padding: 30px 24px; display: flex; flex-direction: column; align-items: flex-start; text-align: left; box-shadow: var(--shadow-md); }
    .feature-item h3 { font-size: 20px; }
    .feature-item p { font-size: 15px; }

    .showcase { padding: 60px 24px; }
    .showcase-content { flex-direction: column; gap: 40px; text-align: center; }
    .showcase-text h2 { font-size: 28px; }
    .showcase-text p { font-size: 16px; }
    .showcase-visual { width: 100%; grid-template-columns: 1fr; gap: 15px; }
    .card-1 { grid-column: auto; }
    
    .cta-section { padding: 80px 20px; }
    .cta-content h2 { font-size: 26px; }
    .cta-content p { font-size: 16px; margin-bottom: 32px; }
    .btn-cta { width: 100%; padding: 16px; font-size: 16px; }

    /* [핵심 수정] 모바일 모달 스크롤 설정 */
    .manual-modal { padding: 0; align-items: flex-end; }
    .modal-content { 
        background-color: #ffffff !important; 
        background: #ffffff !important;
        opacity: 1 !important;
        
        margin: 0; max-width: 100%; border-radius: 24px 24px 0 0; 
        padding: 30px 24px; height: 85vh; 
        
        /* [중요] 내용이 넘치면 박스 안에서 스크롤되도록 설정 */
        overflow-y: auto; 
        
        animation: slideUpMobile 0.3s forwards;
    }
    
    .close-modal { top: 20px; right: 20px; width: 36px; height: 36px; font-size: 24px; }
    .modal-title { font-size: 22px; margin-bottom: 40px; text-align: left; padding-left: 5px; }
    .manual-section { margin-bottom: 40px; padding-bottom: 30px; }
    .manual-block, .manual-block.reverse { flex-direction: column; gap: 20px; }
    .manual-text strong { font-size: 17px; }
    .manual-image { width: 100%; max-width: 100%; margin: 0 auto; border-width: 4px; }
}