/* 
 * 텔레그램 한글사이트 - 채널 통계 가이드 스타일시트
 * 목적: 게시판 전용 와이드 레이아웃 및 테마 스타일링
 */

/* [필수] 그누보드5 기존 CSS 충돌 방지용 완전 리셋 */
#tg-cs-wrapper,
#tg-cs-wrapper *,
#tg-cs-wrapper *::before,
#tg-cs-wrapper *::after {
    box-sizing: border-box;
    margin: 0; padding: 0; border: none;
    outline: none; text-decoration: none;
    list-style: none; background: none;
    font-style: normal;
}

/* 변수 설정 */
:root {
    --cs-primary: #6366f1;
    --cs-primary-dark: #4f46e5;
    --cs-secondary: #8b5cf6;
    --cs-text: #1e293b;
    --cs-text-light: #64748b;
    --cs-slate-300: #cbd5e1;
    --cs-white: #ffffff;
    --cs-gray-50: #f8fafc;
    --cs-gray-100: #f1f5f9;
    --cs-shadow: 0 10px 30px -10px rgba(0, 0, 0, 0.1);
}

/* 기본 스타일 보전 */
#tg-cs-wrapper p {
    margin-bottom: 16px !important;
    line-height: 1.8 !important;
    font-size: 16px !important;
    color: var(--cs-text);
}
#tg-cs-wrapper p:last-child {
    margin-bottom: 0 !important;
}

#tg-cs-wrapper strong {
    font-weight: 700 !important;
    color: var(--cs-primary) !important;
}

/* 최상위 래퍼 (와이드 레이아웃) */
#tg-cs-wrapper.tg-cs-wrapper {
    max-width: 1100px !important;
    margin: 0 auto !important;
    width: 100% !important;
    background: var(--cs-white) !important;
    overflow: hidden !important;
    position: relative !important;
    font-family: 'Pretendard', sans-serif !important;
}

/* 히어로 섹션 */
#tg-cs-wrapper .tg-cs-hero {
    background: linear-gradient(135deg, #3730a3 0%, #6366f1 100%) !important;
    padding: 100px 40px !important;
    text-align: center !important;
    color: var(--cs-white) !important;
    position: relative !important;
    overflow: hidden !important;
}

#tg-cs-wrapper .tg-cs-hero::before {
    content: '' !important;
    position: absolute !important;
    top: -50px !important;
    right: -50px !important;
    width: 280px !important;
    height: 280px !important;
    background: rgba(255, 255, 255, 0.08) !important;
    border-radius: 50% !important;
    z-index: 1 !important;
}

#tg-cs-wrapper .tg-cs-hero__inner {
    position: relative !important;
    z-index: 2 !important;
    max-width: 800px !important;
    margin: 0 auto !important;
}

#tg-cs-wrapper .tg-cs-hero__icon-group {
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    gap: 20px !important;
    margin-bottom: 30px !important;
}

#tg-cs-wrapper .tg-cs-hero__arrow {
    font-size: 20px !important;
}

#tg-cs-wrapper .tg-cs-hero__icon-box {
    width: 70px !important;
    height: 70px !important;
    background: rgba(255, 255, 255, 0.15) !important;
    backdrop-filter: blur(10px) !important;
    border-radius: 20px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

#tg-cs-wrapper .tg-cs-hero__badge {
    display: inline-flex !important;
    align-items: center !important;
    background: rgba(0, 0, 0, 0.2) !important;
    padding: 10px 20px !important;
    border-radius: 100px !important;
    font-size: 13px !important;
    font-weight: 700 !important;
    margin-bottom: 25px !important;
    letter-spacing: 1px !important;
}

#tg-cs-wrapper .tg-cs-hero__title {
    font-size: clamp(32px, 5vw, 48px) !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
    margin-bottom: 25px !important;
}

#tg-cs-wrapper .tg-cs-hero__title span {
    color: #fcd34d !important;
}

#tg-cs-wrapper .tg-cs-hero__desc {
    font-size: 20px !important;
    opacity: 0.9 !important;
    font-weight: 400 !important;
}

/* 메인 영역 */
#tg-cs-wrapper .tg-cs-main {
    padding: 60px 40px !important;
}

#tg-cs-wrapper .tg-cs-section {
    margin-bottom: 80px !important;
}

#tg-cs-wrapper .tg-cs-section__head {
    display: flex !important;
    align-items: center !important;
    gap: 15px !important;
    margin-bottom: 35px !important;
}

#tg-cs-wrapper .tg-cs-section__icon {
    width: 50px !important;
    height: 50px !important;
    background: var(--cs-gray-100) !important;
    border-radius: 14px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: var(--cs-primary) !important;
    font-size: 22px !important;
}

#tg-cs-wrapper .tg-cs-section__title {
    font-size: 28px !important;
    font-weight: 800 !important;
    color: var(--cs-text) !important;
}

/* 그리드 */
#tg-cs-wrapper .tg-cs-grid {
    display: grid !important;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)) !important;
    gap: 25px !important;
}

#tg-cs-wrapper .tg-cs-card {
    background: var(--cs-white) !important;
    padding: 40px 30px !important;
    border-radius: 28px !important;
    border: 1px solid var(--cs-gray-100) !important;
    transition: all 0.3s ease !important;
    text-align: center !important;
}

#tg-cs-wrapper .tg-cs-card:hover {
    transform: translateY(-10px) !important;
    box-shadow: var(--cs-shadow) !important;
    border-color: var(--cs-primary) !important;
}

#tg-cs-wrapper .tg-cs-card__icon-wrap {
    margin-bottom: 25px !important;
}

#tg-cs-wrapper .tg-cs-card__title {
    font-size: 22px !important;
    font-weight: 700 !important;
    margin-bottom: 15px !important;
    color: var(--cs-text) !important;
}

#tg-cs-wrapper .tg-cs-card__desc {
    font-size: 15px !important;
    color: var(--cs-text-light) !important;
}

/* 다크 섹션 (Process) */
#tg-cs-wrapper .tg-cs-section--dark {
    background: #1e1b4b !important;
    margin: 0 -40px 80px !important;
    padding: 80px 40px !important;
    border-radius: 40px !important;
}

#tg-cs-wrapper .tg-cs-section--dark .tg-cs-section__inner {
    max-width: 900px !important;
    margin: 0 auto !important;
}

#tg-cs-wrapper .tg-cs-section--dark .tg-cs-section__title {
    color: var(--cs-white) !important;
}

#tg-cs-wrapper .tg-cs-section--dark .tg-cs-section__icon {
    background: rgba(255, 255, 255, 0.1) !important;
    color: var(--cs-white) !important;
}

#tg-cs-wrapper .tg-cs-section--dark p {
    color: var(--cs-slate-300) !important;
}

#tg-cs-wrapper .tg-cs-section--dark h4 {
    color: var(--cs-white) !important;
}

#tg-cs-wrapper .tg-cs-section--dark strong {
    color: #fcd34d !important;
}

#tg-cs-wrapper .tg-cs-process {
    display: flex !important;
    flex-direction: column !important;
    gap: 20px !important;
}

#tg-cs-wrapper .tg-cs-step {
    display: flex !important;
    background: rgba(255, 255, 255, 0.05) !important;
    border-radius: 24px !important;
    padding: 30px !important;
    gap: 25px !important;
    align-items: flex-start !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
}

#tg-cs-wrapper .tg-cs-step__num {
    background: var(--cs-primary) !important;
    color: white !important;
    width: 60px !important;
    height: 40px !important;
    border-radius: 12px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-weight: 800 !important;
    flex-shrink: 0 !important;
    font-size: 14px !important;
}

#tg-cs-wrapper .tg-cs-step__content h4 {
    font-size: 20px !important;
    font-weight: 700 !important;
    margin-bottom: 8px !important;
    color: var(--cs-white) !important;
}

/* 팁박스 */
#tg-cs-wrapper .tg-cs-tip {
    display: flex !important;
    gap: 25px !important;
    background: var(--cs-gray-50) !important;
    padding: 30px !important;
    border-radius: 24px !important;
    align-items: center !important;
    border: 1px solid var(--cs-gray-100) !important;
}

#tg-cs-wrapper .tg-cs-tip__icon {
    width: 55px !important;
    height: 55px !important;
    border-radius: 18px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    flex-shrink: 0 !important;
}

#tg-cs-wrapper .tg-cs-tip__badge {
    display: inline-block !important;
    padding: 5px 12px !important;
    border-radius: 8px !important;
    font-size: 11px !important;
    font-weight: 800 !important;
    margin-bottom: 10px !important;
}

/* 요약 섹션 */
#tg-cs-wrapper .tg-cs-summary {
    background: linear-gradient(180deg, #1e1b4b 0%, #171717 100%) !important;
    padding: 80px 40px !important;
    border-radius: 40px !important;
    color: var(--cs-white) !important;
}

#tg-cs-wrapper .tg-cs-summary__inner {
    max-width: 900px !important;
    margin: 0 auto !important;
}

#tg-cs-wrapper .tg-cs-summary__title {
    font-size: clamp(28px, 4vw, 36px) !important;
    font-weight: 800 !important;
    margin-bottom: 50px !important;
    text-align: center !important;
    color: var(--cs-white) !important;
}

#tg-cs-wrapper .tg-cs-formula {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: clamp(15px, 3vw, 30px) !important;
    margin-bottom: 50px !important;
    flex-wrap: wrap !important;
}

#tg-cs-wrapper .tg-cs-formula__item {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    gap: 15px !important;
}

#tg-cs-wrapper .tg-cs-formula__icon {
    width: 90px !important;
    height: 90px !important;
    background: rgba(255, 255, 255, 0.1) !important;
    border-radius: 32px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 36px !important;
    color: var(--cs-slate-300) !important;
}

#tg-cs-wrapper .tg-cs-formula__icon--active {
    background: var(--cs-primary) !important;
    color: var(--cs-white) !important;
    box-shadow: 0 15px 40px rgba(99, 102, 241, 0.4) !important;
}

#tg-cs-wrapper .tg-cs-formula__text {
    font-size: 16px !important;
    font-weight: 800 !important;
    color: var(--cs-white) !important;
}

#tg-cs-wrapper .tg-cs-checklist {
    text-align: left !important;
    max-width: 650px !important;
    margin: 0 auto 50px !important;
}

#tg-cs-wrapper .tg-cs-checklist li {
    position: relative !important;
    padding-left: 35px !important;
    margin-bottom: 25px !important;
    font-size: 18px !important;
    color: var(--cs-slate-300) !important;
    line-height: 1.6 !important;
}

#tg-cs-wrapper .tg-cs-checklist li::before {
    content: '\f058' !important;
    font-family: 'Font Awesome 5 Free' !important;
    font-weight: 900 !important;
    position: absolute !important;
    left: 0 !important;
    color: #fcd34d !important;
    font-size: 22px !important;
}

#tg-cs-wrapper .tg-cs-checklist li strong {
    color: var(--cs-white) !important;
}

#tg-cs-wrapper .tg-cs-footer {
    font-size: 16px !important;
    color: var(--cs-slate-400) !important;
    padding-top: 40px !important;
    border-top: 1px solid rgba(255, 255, 255, 0.1) !important;
    text-align: center !important;
}

/* 애니메이션 */
#tg-cs-wrapper .tg-cs-motion {
    opacity: 0 !important;
    transform: translateY(40px) !important;
    transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1) !important;
}

#tg-cs-wrapper .tg-cs-motion.is-visible {
    opacity: 1 !important;
    transform: translateY(0) !important;
}

/* 모바일 대응 */
@media (max-width: 768px) {
    #tg-cs-wrapper .tg-cs-main { padding: 40px 20px !important; }
    #tg-cs-wrapper .tg-cs-hero { padding: 80px 20px !important; }
    #tg-cs-wrapper .tg-cs-hero__icon-group { gap: 10px !important; }
    #tg-cs-wrapper .tg-cs-section--dark { margin: 0 -20px 80px !important; padding: 60px 20px !important; }
    #tg-cs-wrapper .tg-cs-formula { gap: 15px !important; }
    #tg-cs-wrapper .tg-cs-card { padding: 30px 20px !important; }
}
