<!doctype html>
<html lang="en">
<head>
        

<meta charset="utf-8">
<title>Fajrin Indah | cc·cc</title>

<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
<meta name="description" content="One link. One email. One identity. All on cc.cc">
<meta name="keywords" content="">

<meta name="robots" content="noindex">

<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="pragma" content="no-cache">
<meta name="format-detection" content="telephone=no,email=no,address=no">

<meta name="google" content="notranslate">

<link rel="canonical" href="https://fajrin.cc.cc/post/4102772633">

<meta name="theme-color" content="#ffffff">

<!-- Open Graph -->
<meta property="og:title" content="Fajrin Indah | cc·cc">
<meta property="og:description" content="One link. One email. One identity. All on cc.cc">
<meta property="og:url" content="https://fajrin.cc.cc/post/4102772633">
<meta property="og:image" content="https://short-img1.cc.cc/2026/202609/20260904/d8bfb23ad.png">
<meta property="og:image:secure_url" content="https://short-img1.cc.cc/2026/202609/20260904/d8bfb23ad.png">
<meta property="og:image:type" content="image/png">
<meta property="og:image:width" content="1200">
<meta property="og:image:height" content="630">
<meta property="og:type" content="profile">
<meta property="og:locale" content="en_US">
<meta property="og:site_name" content="cc·cc">

<!-- Twitter Card -->
<meta name="twitter:card" content="summary_large_image">
<meta name="twitter:title" content="Fajrin Indah | cc·cc">
<meta name="twitter:description" content="One link. One email. One identity. All on cc.cc">
<meta name="twitter:image" content="https://short-img1.cc.cc/2026/202609/20260904/d8bfb23ad.png">
<meta name="twitter:image:alt" content="Fajrin Indah | cc·cc">
<meta name="twitter:url" content="https://fajrin.cc.cc/post/4102772633">
<meta name="twitter:domain" content="cc.cc">

<link rel="shortcut icon" href="https://short-img1.cc.cc/img/favicon-256.png">

<script src="https://short-img1.cc.cc/js/jquery.min.js"></script><!-- Icons Css -->


<!-- Bootstrap Css -->
<link href="https://short-img1.cc.cc/css/bootstrap.min.css" id="bootstrap-style" rel="stylesheet" type="text/css" />

<!-- App Css 2025-08-20-->
<link href="https://short-img1.cc.cc/css/app.min.css" id="app-style" rel="stylesheet" type="text/css">

<!--Custom Css-->

<!-- 모바일에서 상단 줄 생기는 현상 방지-->
<style>
@media (max-width: 767px) {
  .shape svg {
    margin-bottom: -2px;
  }
}
</style>

<style>

/* [우선순위 1] 최상위 뷰포트 및 레이아웃 박스 기준 정립 */
html {
  width: 100%;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
}

body {
  width: 100%;
  min-height: 100vh;
  margin: 0;
  padding: 0;
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  align-items: center; /* 자식 요소들 가로 중앙 정렬 */
  justify-content: flex-start;
}

/* [우선순위 2] .container 레이아웃 중앙 정렬 보장 */
.container {
  width: 100%;
  max-width: 480px;
  box-sizing: border-box;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 70px;
}

/* [우선순위 3] X 인앱 브라우저에서 쏠림을 유발하는 고정(fixed) 하단바 수정 */
.powered-by {
  text-align: center;
  margin-top: 20px;
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  width: 100%;
  max-width: 480px; /* 컨테이너 최대 너비와 일치시킴 */
  margin-left: auto;
  margin-right: auto;
  padding: 10px 0;
  box-sizing: border-box;
  z-index: 1000;
}

/* [우선순위 4] 미디어 및 카드 요소 오버플로우 방지 */
img, .popup-content, .card {
  max-width: 100%;
  box-sizing: border-box;
}

.landing-bg {
  background-color: #f1f0fe;
}

/* iOS Safari 전용 */
@supports (-webkit-touch-callout: none) {
  .offcanvas-backdrop {
    background-color: #f1f0fe !important;
  }
}

.posting_head_color {
  color: #545454;
}

.btn + .btn {
  margin-left: 20px;
}

.avatar-lg {
  width: 150px;
  height: 150px;
  position: relative;
  display: inline-block;
}

.settings-badge {
  position: absolute;
  bottom: 20px; 
  right: 0px; 
  width: 32px;
  height: 32px;
  background-color: var(--bs-primary);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  color: var(--bs-danger);
  font-size: 14px; 
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15); 
  z-index: 2;
}

.social-verified-badge {
  position: absolute;
  bottom: 20px; 
  right: 5px; 
  width: 32px;
  height: 32px;
  background-color: var(--bs-white);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 14px; 
  border: 2px solid white;
  box-shadow: 0 2px 4px rgba(0,0,0,0.15); 
  z-index: 2;
}

.qr-rounded {
  border-radius: 1.0rem;
  overflow: hidden;
}

.card-body {
  padding: 2rem;
}

.blog-title {
  font-size: 1.5rem;
}

.fs-17 {
  font-size: 1.5rem;
}

.powered-bookmark-tooltip {
  display: none;
  position: fixed;
  left: 50%;
  bottom: 55px;
  transform: translateX(-50%);
  z-index: 1001;
  text-align: center;
  background: #333;
  color: #fff;
  padding: 8px 14px;
  border-radius: 999px;
  font-size: 12px;
  white-space: nowrap;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.profile-name {
  margin-top: 5px;
}

.bg-disabled {
  background-color: #d3d3d3 !important;
}

.bg-disabled-like {
  background-color: #dddddd !important;
}

.tooltip-custom {
  display: none;
  position: fixed;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background-color: #343a40;
  color: white;
  padding: 10px;
  border-radius: 5px;
  font-size: 0.875rem;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.3s;
  width: 220px;
  text-align: center;
  z-index: 10;
}

.tooltip-show {
  visibility: visible;
  opacity: 1;
}

.tooltip-custom-click {
  position: absolute;
  background-color: #343a40;
  color: white;
  padding: 6px 10px;
  border-radius: 4px;
  font-size: 0.875rem;
  box-shadow: 0 0 6px rgba(0, 0, 0, 0.3);
  z-index: 15;
  white-space: normal;
  word-break: break-word;
  max-width: 90vw;
  text-align: center;
  visibility: hidden;
  opacity: 0;
  transition: visibility 0s, opacity 0.3s;
}

.tooltip-custom-click.tooltip-show {
  visibility: visible;
  opacity: 1;
}

.deactivate-link {
  color: var(--bs-secondary);
}

input,
textarea,
input::placeholder,
textarea::placeholder {
  font-size: 17px !important;
}

#offcanvasRight {
  width: 300px; 
}

.stars {
  color: #f4b400;
  font-size: 16px;
}

.bad_stars {
  color: #74788d;
  font-size: 16px;
}

#bookmark_no {
  border-top: 1px solid var(--bs-list-group-border-color);
}

.form-control::placeholder,
.form-select::placeholder,
input::placeholder,
textarea::placeholder {
  color: #b8bbc6 !important;
  opacity: 1 !important;
}

.badge {
  font-size: 0.975rem !important;
  padding: 0.375em 0.75em !important;
  font-weight: 200 !important;
}

</style>


<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=G-9T9CVW81BZ"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'G-9T9CVW81BZ');
</script>

<!-- Google tag (gtag.js) -->
<script async src="https://www.googletagmanager.com/gtag/js?id=AW-17432333679"></script>
<script>
  window.dataLayer = window.dataLayer || [];
  function gtag(){dataLayer.push(arguments);}
  gtag('js', new Date());

  gtag('config', 'AW-17432333679');
</script>


</head>

<body class="d-flex justify-content-center align-items-center min-vh-100 landing-bg">
<div class="container landing-bg">

<style>
.fixed-top {
        position: fixed;
        top: 10px;
        left: 0;
        width: 100%;
        z-index: 10;
}

.btn-square {
    font-size: 24px; /* 원하는 크기로 설정 */
}


.header-item {
    padding: 0;  /* 패딩 제거 */
    margin: 0;   /* 마진 제거 */
    display: flex;
    align-items: center;
}

.dropdown-menu {
    margin-top: 0 !important;  /* 드롭다운과 아이콘 사이 간격 제거 */
}

.list-group-item:hover {
        background-color: #f8f9fa; /* 연한 회색 (Bootstrap 기본 색상) */
        cursor: pointer; /* 마우스 포인터 변경 */
}

.menu-box {
  width: 380px;
  min-width: 380px;
  max-width: 400px;
  box-sizing: border-box;
  /* margin-left, margin-right 없앰 */
}

@media (max-width: 576px) {
  .menu-box {
    width: 100%;
    min-width: auto;
    max-width: none;
  }
}


#notification {
    outline: none !important;
    box-shadow: none !important;
}
#notification:focus {
    outline: none !important;
    box-shadow: none !important;
}


.social-link {
        display: inline-flex !important;
        align-items: center !important;
        justify-content: center !important;
}

.social-link2 {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;

  width: 32px;
  height: 32px;
  border-radius: 50%;
  background-color: #74788d;

  svg, i {
    width: 50%;
    height: 50%;
  }
}


.facebook-messenger-active {
  background-color: #0084ff !important; 
  color: #fff !important;
}

.whatsapp-active {
  background-color: #25D366 !important;
  color: #fff !important;
}

.telegram-active {
  background-color: #0088CC !important; 
  color: #fff !important;
}

.viber-active {
  background-color: #665CAC !important;
  color: #fff !important;
}


.qq-active {
  background-color: #1EBAFC !important;
  color: #fff !important;
}

.menu-badge {
        position: absolute;
        top: 0px;
        right: 4px;

        width: 8px;
        height: 8px;

        background: #dc3545;
        border-radius: 50%;

        display: block;
        padding: 0;
}


/* 프로필 기본 (기존 유지) */
#profile_img {
    display: block;
}

/* QR 상태일 때 */
#profile_img.qr-mode {
    border-radius: 1.0rem;
    padding: 5px;               /* ✅ 절반으로 감소 */
    background: #ffffff;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    object-fit: contain;
}


/* QR 이미지 자체는 절대 자르지 않음 */
#profile_img.qr-mode {
    object-fit: contain;
}
</style>



<div class="fixed-top text-center" style="background-color: transparent;">
        <div class="d-flex justify-content-center w-100 px-3"> <!-- px-3: 좌우 padding -->
                <div class="menu-box">
                        <div class="d-flex justify-content-between w-100">
                                <div>

                                        <div id='cc_cc_log_menu' style='display:none'>
                                            <a href="https://cc.cc" 
                                               style="display: inline-flex; align-items: center; justify-content: center; width: 40px; height: 40px; text-decoration: none;">
                                                <img src='https://short-img1.cc.cc/img/favicon-256.png' 
                                                     alt="favicon" 
                                                     style="width: 24px; height: 24px; object-fit: contain;">
                                            </a>
                                        </div>


                                        <div id='qr_code_menu' style='display:none'>
                                                <a href="javascript:void(0)" onClick="openQRPopup('qr','')"
                                                                class="badge bg-light text-dark rounded-circle d-inline-flex align-items-center justify-content-center"
                                                                style="width:40px; height:40px; padding:0;">
                                                        <span id='qr_svg'>
                                                                <svg
                                                                  xmlns="http://www.w3.org/2000/svg"
                                                                  width="24"
                                                                  height="24"
                                                                  viewBox="0 0 256 256"
                                                                  fill="currentColor"
                                                                >
                                                                  <g>
                                                                    <path d="M104.00244,40h-48a16.01833,16.01833,0,0,0-16,16v48a16.01833,16.01833,0,0,0,16,16h48a16.01833,16.01833,0,0,0,16-16V56A16.01833,16.01833,0,0,0,104.00244,40Zm0,64h-48V56h48l.00977,48Z"/>
                                                                    <path d="M104.00244,136h-48a16.01833,16.01833,0,0,0-16,16v48a16.01833,16.01833,0,0,0,16,16h48a16.01833,16.01833,0,0,0,16-16V152A16.01833,16.01833,0,0,0,104.00244,136Zm0,64h-48V152h48l.00977,48Z"/>
                                                                    <path d="M200.00244,40h-48a16.01833,16.01833,0,0,0-16,16v48a16.01833,16.01833,0,0,0,16,16h48a16.01833,16.01833,0,0,0,16-16V56A16.01833,16.01833,0,0,0,200.00244,40Zm0,64h-48V56h48l.00977,48Z"/>
                                                                    <path d="M144.00244,184a8.00039,8.00039,0,0,0,8-8V144a8,8,0,0,0-16,0v32A8.00039,8.00039,0,0,0,144.00244,184Z"/>
                                                                    <path d="M208.00244,152h-24v-8a8,8,0,0,0-16,0v56h-24a8,8,0,1,0,0,16h32a8.00039,8.00039,0,0,0,8-8V168h24a8,8,0,0,0,0-16Z"/>
                                                                    <path d="M208.00244,184a8.00039,8.00039,0,0,0-8,8v16a8,8,0,0,0,16,0V192A8.00039,8.00039,0,0,0,208.00244,184Z"/>
                                                                  </g>
                                                                </svg>
                                                        </span>
                                                        <span id='img_svg' style='display:none'>
                                                                <svg xmlns="http://www.w3.org/2000/svg" width="24" height="24" fill="currentColor" class="text-secondary" viewBox="0 0 16 16">
                                                                <path d="M8 8a3 3 0 1 0 0-6 3 3 0 0 0 0 6m2-3a2 2 0 1 1-4 0 2 2 0 0 1 4 0m4 8c0 1-1 1-1 1H3s-1 0-1-1 1-4 6-4 6 3 6 4m-1-.004c-.001-.246-.154-.986-.832-1.664C11.516 10.68 10.289 10 8 10s-3.516.68-4.168 1.332c-.678.678-.83 1.418-.832 1.664z"/>
                                                                </svg>
                                                        </span>
                                                </a>
                                        </div>
                                </div>

                                <div class="d-flex gap-2">

                                        <a href="javascript:void(0)"
                                                id="notification"
                                                data-bs-toggle="offcanvas"
                                                data-bs-target="#offcanvasRight"
                                                data-bs-scroll="true"
                                                data-bs-backdrop="true"
                                                class="position-relative d-inline-flex align-items-center justify-content-center
                                                rounded-circle bg-light text-dark"
                                                style="width:40px; height:40px;">


                                                        <svg 
                                                          xmlns="http://www.w3.org/2000/svg" 
                                                          width="20" 
                                                          height="20" 
                                                          viewBox="0 0 24 24" 
                                                          fill="none" 
                                                          stroke="currentColor" 
                                                          stroke-width="2" 
                                                          stroke-linecap="round"
                                                        >
                                                          <line x1="4" y1="7" x2="20" y2="7"></line>
                                                          <line x1="4" y1="12" x2="20" y2="12"></line>
                                                          <line x1="4" y1="17" x2="20" y2="17"></line>
                                                        </svg>
                                        </a>

                                </div>
                        </div>
                </div>
        </div>
</div>


<div class="text-center">
        <div class="d-flex justify-content-center w-100 px-3">
                <!-- px-3: 좌우 padding -->
                <div class="menu-box">
                        <div class="d-flex justify-content-between w-100">
                                <div class="text-center  w-100">
                                        <div class="position-relative d-inline-block" style='margin-top:55px'>
                                                <img id='profile_img' src="https://short-img1.cc.cc/2026/202609/20260904/45ca9dd0.png" alt="fajrin.cc.cc" class="rounded-circle img-thumbnail avatar-lg mb-2">                                        </div>

                                        <h6 class="profile-name text-break px-1 w-100" style="font-size: 20px">
                                                Fajrin Indah                                        </h6>


                                        <p id='short_code_first' class='px-1 w-100'>
                                                <a href="javascript:void(0)"
                                                        onClick="$('#modal_make_your_cc_cc').modal('show')"
                                                        class="text-primary text-break"
                                                        style="font-size:13pt;">
                                                        fajrin.cc.cc
                                                </a>
                                        </p>

                                        <p id='short_code_second' class='px-1 w-100' style='display:none;'>
                                                <a href="javascript:void(0)"
                                                        onClick="$('#modal_make_your_cc_cc').modal('show')"
                                                        class="text-primary text-break"
                                                        style="font-size:13pt;">
                                                        <span style='font-size:13pt;'>fajrin@cc.cc</span>
                                                </a>

                                        </p>

                                        <ul class="mt-3 candidate-detail-social-menu list-inline mb-0">
                                                <li class="list-inline-item">
                                                        <a href="javascript:void(0)" class="social-link  bg-disabled text-white" id='not-allowed-phone' 
                                                                                                data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-trigger="manual"
                                                                                                title="The other party has not allowed phone connections.">
                                                                <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone-icon lucide-phone"><path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384"/></svg>
                                                        </a>
                                                </li>
                                                <li class="list-inline-item">
                                                        <a href="javascript:void(0)" class="social-link bg-primary" onClick="openPopup()"><svg viewBox="0 0 20 20" xmlns="http://www.w3.org/2000/svg" fill="#ffffff" width="18px" height="18px" style="vertical-align: top;">
  <g id="Email">
    <path d="M15.625,2.5H4.375A3.125,3.125,0,0,0,1.25,5.625V14.375A3.125,3.125,0,0,0,4.375,17.5H15.625A3.125,3.125,0,0,0,18.75,14.375V5.625A3.125,3.125,0,0,0,15.625,2.5ZM4.375,3.75H15.625A1.875,1.875,0,0,1,17.125,4.76L11.25,9.87a1.875,1.875,0,0,1-2.5,0L2.875,4.76A1.875,1.875,0,0,1,4.375,3.75ZM15.625,16.25H4.375A1.875,1.875,0,0,1,2.5,14.375V5.85L8.762,11.2a3.125,3.125,0,0,0,4.176,0L17.5,5.85V14.375A1.875,1.875,0,0,1,15.625,16.25Z"/>
  </g>
</svg></a>
                                                </li>
                                                <li class="list-inline-item">
                                                        <span class="social-link bg-disabled-like">
                                                                <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16"></svg>
                                                        </span>
                                                </li>                                                        
                                        </ul>
                                </div>

                                <div class="tooltip-custom" id="tooltip">The person has not provided a phone number.</div>

                        </div>
                </div>
                <!--end blog-author-sidebar-->
        </div>
</div>

<style>
.write-fixed-width {
        width: 380px; /* 기본 고정 너비 */
        min-width: 380px;
        max-width: 400px;
}
/* 모바일 화면 폭이 380px 이하일 경우 */
@media (max-width: 380px) {
        .write-fixed-width {
                width: 99%; /* 화면 폭의 98%로 설정 */
                min-width: auto; /* 최소 너비 제한 해제 */
                max-width: none; /* 최대 너비 제한 해제 */
        }
}

.card-fixed-width {
        width: 380px; /* 기본 고정 너비 */
        min-width: 380px;
        max-width: 400px;
        border: 1px solid #e1e0fe;
        border-radius: 1.0rem; /* ← 둥글기 추가 (24px) */
}

/* 모바일 화면 */
@media (max-width: 576px) {
        .card-fixed-width {
                width: 98%; /* 화면 폭의 98%로 설정 */
                min-width: auto; /* 최소 너비 제한 해제 */
                max-width: none; /* 최대 너비 제한 해제 */
                border-radius: 1.0rem; /* 모바일에서 살짝만 줄여도 예쁨 */
        }
}

.card-fixed-width img {
    display: block;
    width: 100%;
    background-color: #e9ecef;
}

.posting-text-color
{
        color:#3d454e;
}
</style>

                <!--end col-->


<style>

/* 컨테이너 그리드 설정 */
.video-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); /* 쇼츠 대응을 위해 최소폭 약간 축소 */
    gap: 20px;
    padding: 20px;
}

/* 기본 아이템 스타일 */
.yt-lazy-item {
    position: relative;
    width: 100%;
    background: #000;
    border-radius: 0;
    overflow: hidden;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

/* [중요] 일반 영상 비율 (16:9) */
.yt-lazy-item.is-standard {
    aspect-ratio: 16 / 9;
}

/* [중요] 쇼츠 영상 비율 (9:16) */
.yt-lazy-item.is-shorts {
    aspect-ratio: 9 / 16;
    max-width: 345px; /* 쇼츠가 너무 커지지 않게 제한 (선택사항) */
    margin: 0 auto;  /* 중앙 정렬 */
}

.yt-lazy-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

.yt-lazy-item:hover img { transform: scale(1.05); }

.yt-lazy-item .yt-play {
    position: absolute; inset: 0;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.2);
}

.yt-lazy-item .yt-play span {
    width: 68px; height: 48px;
    border-radius: 0;
    background: rgba(255, 0, 0, 0.9);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
}

.yt-lazy-item:hover .yt-play span { background: #f00; transform: scale(1.1); }

.yt-lazy-item .yt-play span:before {
    content: "";
    border-style: solid;
    border-width: 10px 0 10px 18px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}
</style>

        </div>
        <!--end row-->
</div>

<!--end container-->

<style>

/* 딤처리 오버레이 */
.popup-overlay {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.4);
	z-index: 15;
	display: none;
}

/* 팝업 레이어 */
.offcanvas-static {
	position: fixed;
	bottom: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 90%;
	max-width: 600px;
	background: #fff;
	border-top-left-radius: 16px;
	border-top-right-radius: 16px;
	box-shadow: 0 -2px 12px rgba(0, 0, 0, 0.15);
	z-index: 16;
	display: none;
}

.offcanvas-static.max-400 {
	max-width: 400px;
}

.popup-header-line {
	display: flex;
	justify-content: center;
	align-items: center;
	position: relative;
	padding: 0.5rem 1rem 0.25rem;
	background-color: #f8f9fa;
	/* 상단 배경색 */
	border-top-left-radius: 16px;
	border-top-right-radius: 16px;
}

.popup-address {
	font-size: 1.1rem;
	font-weight: 600;
	color: #4a4a4a;
}

.popup-qr{
    margin: 0 40px 0 4%;
    font-size: 1rem;
    line-height: 1.5;
    color: #495057;
    word-break: break-word;
}

.popup-close {
	position: absolute;
	right: 12px;
	top: 6px;
	transform: scale(0.8);
}

.popup-body {
	text-align: center;
	padding: 0.25rem 1rem 1rem;
}

.popup-desc {
	font-size: 0.875rem;
	color: #6c757d;
	margin-bottom: 0.75rem;
}

.popup-btn-sm {
	padding-top: 0.4rem;
	padding-bottom: 0.4rem;
	font-size: 0.875rem;
        width: 100%;
}

</style>
<div class="popup-overlay" id="popupOverlay" onclick="closePopup()"></div>
<!-- 하단 고정 팝업 -->
<div class="offcanvas-static" id="ccPopup">
	<div class="popup-header-line">
                <div class="popup-address" style="margin: 0 4%; word-break: break-all; white-space: normal;position: relative; display: inline-block;">
                        <span id="copy_email" style="cursor: pointer;">
                                fajrin@cc.cc                        </span>

                        <a href='javascript:void(0)' onClick="$('#copy_email').trigger('click')"
                                class="btn btn-outline-primary rounded-pill px-2 py-0 small"
                                style='font-size: 70%;padding: 0.12rem 0.3rem;'>
                                Copy                        </a>

                        <div id="copy_email_tooltip" style="
                                        display: none;
                                        position: absolute;
                                        top: 100%;
                                        left: 50%;
                                        transform: translateX(-50%);
                                        margin-top: 5px;
                                        background-color: #333;
                                        color: #fff;
                                        padding: 5px 10px;
                                        border-radius: 4px;
                                        font-size: 12px;
                                        white-space: nowrap;
                                        z-index: 10;
                                        ">
                                Copied!                        </div>
                </div>
	</div>
	<div class="popup-body">
                <div class='mb-2'>
                        <a href='mailto:fajrin@cc.cc' class="btn btn-primary popup-btn-sm">Send Email</a>
                </div>

                <div class="card mb-2 bg-light">
                        <div class='text-start' style="padding:10px;">
                                <span class="popup-desc">
                                        <span class='text-dark'><b>CC.CC</b></span> provides a short, memorable email alias that forwards messages to the user's real email.                                        <a href='https://cc.cc' target='_blank' class='text-primary'>Get your cc.cc – just like this.</a>
                                </span>
                        </div>
                </div>
	</div>
</div>


<div class="offcanvas-static" id="qrPopup">
	<!-- Header -->
	<div class="popup-header-line position-relative">
		<h6 class="mt-1 text-center fw-semibold" id='qr_title'>
			View on mobile
		</h6>
		<button type="button"
			class="btn-close"
			aria-label="Close"
			style="position:absolute; top:10px; right:10px;"
			onclick="closePopup()">
		</button>
	</div>
	<!-- Body -->
	<div class="popup-body text-center">
		<!-- QR Image -->
		<div class="mt-2 mb-3">
			<img src="https://short-img3.cc.cc/2026/202609/20260904/1788455545583.png"
				alt="QR Code"
				class="img-fluid">
		</div>
		<!-- Download Button -->
		<div class="mb-3 text-center">
			<a href="javascript:void(0);"
				class="btn btn-sm btn-light btn-outline-secondary rounded-pill"
				onclick="downloadQrCode();">
			<i class="fa fa-download me-1"></i>
			Download QR Image			</a>
		</div>
		<!-- Description -->
		<div class="text-muted px-3" style="font-size:12px; line-height:1.6;"  id='qr_desc'>
		</div>
	</div>
</div>

<script>
function downloadQrCode()
{
    const url = 'https://short-img3.cc.cc/2026/202609/20260904/1788455545583.png';

    fetch(url)
        .then(response => response.blob())
        .then(blob => {
            const a = document.createElement('a');
            a.href = URL.createObjectURL(blob);
            a.download = 'qr-code.png';
            document.body.appendChild(a);
            a.click();
            document.body.removeChild(a);
            URL.revokeObjectURL(a.href);
        });
}
</script>


<script>
/*
setup : */

function openQRPopup(opt,val) {

        if (opt == 'qr')
        {
                $('#qr_title').html("View on mobile");
                if (!check_mobile())
                {
                        $('#qr_desc').html("Scan to open this page instantly. Download the QR code image and use it on social media, business cards, flyers, or anywhere you want to share this page.");
                }
        }
        else
        {
                $('#qr_title').html(val);
                $('#qr_desc').html("This feature is only supported on mobile devices. Scan this QR code with your smartphone camera to continue.");
        }

        $("#popupOverlay").show();
        $("#qrPopup").show();
}


function openPopup() {
        $("#popupOverlay").show();
        $("#ccPopup").show();
}

function closePopup() {
        $("#popupOverlay").hide();
        $("#ccPopup").hide();
        $("#qrPopup").hide();
}


function openSharePopup() {
        $("#getSeenOverlay").show();
        $("#getSeenPopup").show();
}

function closeSharePopup() {
        $("#getSeenOverlay").hide();
        $("#getSeenPopup").hide();
}

$('#copy_email').click(function () {
    let tooltip = $('#copy_email_tooltip');
    let originalContent = $(this)
            .text()
            .replace(/\u00A0/g, ' ') // &nbsp;
            .replace(/\s+/g, ' ')
            .trim();


    navigator.clipboard.writeText(originalContent).then(() => {
        // 툴팁 보여주기
        tooltip.fadeIn(200);

        // 2초 후 툴팁 숨기기
        setTimeout(() => {
            tooltip.fadeOut(200);
        }, 2000);
    }).catch(() => {
        console.error('Copy failed!');
    });
});

</script>




<div class="popup-overlay" id="popupRequestBuyOverlay" onclick="closeRequestBuyPopup()"></div>
<!-- 하단 고정 팝업 -->
<div class="offcanvas-static" id="ccRequestBuyPopup">
	<div class="popup-header-line">
                <div class="popup-address">Interested in this name?</div>
		<button type="button" class="btn-close popup-close" onclick="closeRequestBuyPopup()" aria-label="Close"></button>
	</div>
	<div class="popup-body">
                <div class='mt-2 mb-2 text-start'>
                        You can send a request to the owner and express your interest in purchasing this cc.cc name.                </div>

                <form id='offer_send_mail_form'>
                <div class="mb-2">
                        <input type="text" class="form-control" id="offer_subject" maxlength=30 placeholder="Enter subject" required
                                        autocomplete="on" 
                                        autocorrect="off" 
                                        autocapitalize="off" 
                                        spellcheck="false">
                </div>

                <div class="mb-2">
                        <textarea class="form-control" id="offer_mssg" placeholder="Message to the owner (include your offer)" required
                                        rows=4 
                                        autocomplete="on" 
                                        autocorrect="off" 
                                        autocapitalize="off" 
                                        spellcheck="false"></textarea>
                </div>

                <div class='mt-2'>
                        <button type='submit' id='request_buy_submit' class="btn btn-primary popup-btn-sm">Send Purchase Request</button>
                        <div class="spinner-border text-primary m-1" role="status" id='request_buy_loading' style='display:none'></div>
                </div>      

                </form>
	</div>
</div>


<script>



$('#offer_send_mail_form').on('submit', function(e) {
        e.preventDefault(); // 기본 폼 제출 막기

        $('#request_buy_loading').show(); // 스피너 보이기
        $('#request_buy_submit').hide();

        var to = 'fajrin@cc.cc';

        var offer_subject = $.trim($('#offer_subject').val());
        var offer_mssg = $.trim($('#offer_mssg').val());

        var subjectEncoded = encodeURIComponent(offer_subject);
        var bodyEncoded = encodeURIComponent(offer_mssg);

        var mailtoLink = `mailto:${to}?subject=${subjectEncoded}&body=${bodyEncoded}`;
        window.location.href = mailtoLink;


        setTimeout(function () {
                    $('#request_buy_loading').hide(); // 5초 후 숨기기
                    $('#request_buy_submit').show();
                    closeRequestBuyPopup();
        }, 5000); // 5000ms = 5초
});


function openRequestBuyPopup() {
        $("#popupRequestBuyOverlay").show();
        $("#ccRequestBuyPopup").show();

        var url = '/short_code/request_buy_proc_ajax.php';
        var params = 'r=' + Math.random();

//        console.log('params',params);

        $.ajax({
                type:'GET',
                url:url,
                data:params,
                contentType: "charset=utf-8",
                success: function(res) {
//                        console.log(res);
                }
        });
}

function closeRequestBuyPopup() {
        $("#popupRequestBuyOverlay").hide();
        $("#ccRequestBuyPopup").hide();
}
</script>


<style>

/* ===========================
   Explore Box
   =========================== */

.explore-box {
    min-height: 320px;
}

@media (max-width: 991.98px) {
    .explore-box {
        min-height: 220px;
    }
}

@media (max-width: 575.98px) {
    .explore-box {
        min-height: 240px;
    }
}


.explore-slider{
    position:relative;
}

/* 가로 슬라이더 */
.explore-image-list{
    display:grid;
    grid-auto-flow:column;          /* 가로 방향으로 쌓기 */
    grid-template-rows:repeat(2, auto); /* 2줄 */
    gap:15px 22px;                 /* 세로 / 가로 간격 */
    overflow-x:auto;
    padding:20px 15px 35px;
}

.explore-image-list::-webkit-scrollbar{
    display:none;
}

.explore-item{
    width:100px;
    text-align:center;
}

/* 카드 */

.explore-item{
    flex:0 0 auto;
    width:100px;
    text-align:center;
    scroll-snap-align:start;
}

/* 원형 이미지 */

.explore-thumb-wrap{
    display:block;
    width:100px;
    height:100px;
    border-radius:50%;
    overflow:hidden;
    margin:0 auto;
}

.explore-thumb-wrap-small{
    display:block;
    width:80px;
    height:80px;
    border-radius:50%;
    overflow:hidden;
    margin:0 auto;
}

.explore-thumb{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
}

/* 텍스트 */

.explore-title,
.explore-user{
    width:100%;
}



.explore-title a
{
    font-size:10pt;
    display:block;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
    font-weight:bold;
}

.explore-user a{
    font-size:11px;
    display:block;
    overflow:hidden;
    white-space:nowrap;
    text-overflow:ellipsis;
}


/* 화살표 */

.explore-arrow{
    position:absolute;
    top:50%;
    transform:translateY(-50%);
    width:34px;
    height:34px;
    border:none;
    border-radius:50%;
    background:rgba(0,0,0,0.55);
    color:#fff;
    font-size:20px;
    display:flex;
    align-items:center;
    justify-content:center;
    cursor:pointer;
}

.explore-left{
    left:0;
}

.explore-right{
    right:0;
}

.popup-header-explore{
    display:flex;
    align-items:center;
    justify-content:space-between;
}
</style>

<div class="popup-overlay" id="exploreOverlay" onclick="closeExplorePopup()"></div>
<!-- 하단 고정 팝업 -->
<div class="offcanvas-static" id="explorePopup">
        <div class="popup-header-explore">
                <span class='mt-3 ms-3 fw-bold'>Explore other profiles</span>
                <button type="button" class="btn-close popup-close" onclick="closeExplorePopup()" aria-label="Close"></button>
        </div>

	<div class="popup-body explore-box">
                <div class="explore-slider">

                        <!-- 좌 화살표 -->
                        <button class="explore-arrow explore-left d-none d-md-flex"
                            onclick="scrollExplore(-1)">
                        ‹
                        </button>

                        <!-- 이미지 리스트 -->
                        <div id="exploreImageList" class="explore-image-list">
                        <!-- AJAX 이미지 들어오는 영역 -->
                        </div>

                        <!-- 우 화살표 -->
                        <button class="explore-arrow explore-right d-none d-md-flex"
                            onclick="scrollExplore(1)">
                        ›
                        </button>
                </div>
	</div>
</div>


<script>
let posting_enc = '';
let posting_currency = '';

$(document).ready(function()
{
        var userAgent = navigator.userAgent;
        var isTwitter = userAgent.toLowerCase().includes('twitter');
        var isAndroid = userAgent.toLowerCase().includes('android');

        $('#third_party_twitter').hide();
        if (isTwitter && isAndroid)
        {
                $('#third_party_pc').hide();
                $('#third_party_mobile').hide();
                $('#third_party_twitter').show();
        }
        else
        {
                if ($('#third_party_mobile').length)
                {
                        $('#third_party_mobile').hide();
                        $('#third_party_pc').show();

                        if (check_mobile())
                        {
                                $('#third_party_mobile').show();
                                $('#third_party_pc').hide();
                        }
                }
        }
});

$(document).on("click",".copy-link-item",function(){

    var url = window.location.href;

    var $icon = $(this).find(".copy-icon");
    var $text = $(this).find(".copy-text");

    var originalIcon = $icon.html();
    var originalText = $text.text();

    var checkSvg = '<span class="text-success"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" fill="currentColor" width="18px" height="18px" style="vertical-align: top;">  <path d="M6.173 13.414L1.757 9l1.414-1.414 3.002 3.001L12.83 3.93l1.414 1.414z"/></svg></span>';

    navigator.clipboard.writeText(url).then(function(){

        $icon.html(checkSvg);
        $text.text("Copied!");

        setTimeout(function(){
            $icon.html(originalIcon);
            $text.text(originalText);
        },1000);

    }).catch(function(){

        var temp = $("<input>");
        $("body").append(temp);
        temp.val(url).select();
        document.execCommand("copy");
        temp.remove();

        $icon.html(checkSvg);
        $text.text("Copied!");

        setTimeout(function(){
            $icon.html(originalIcon);
            $text.text(originalText);
        },1000);

    });

});


async function shareContact() {
  const shareData = {
    title: "Fajrin Indah | cc\u00b7cc",
    text: '',
    url: "https:\/\/fajrin.cc.cc"  };

  if (navigator.share) {
    try {
      await navigator.share(shareData);
      return;
    } catch (err) {
      if (err.name === 'AbortError') return;
    }
  }

  try {
    await navigator.clipboard.writeText(shareData.url);
    alert('Link copied');
  } catch {
    prompt('Copy this link:', shareData.url);
  }
}


function openPayPalAmountSelect(p_enc,p_currency)
{
        posting_enc = p_enc;
        posting_currency = p_currency;
        $('#PayPalAmountSelect').modal('show');

//        console.log('posting_currency',posting_currency);

        $('.def_currency').html(p_currency);
        if (p_currency == 'USD')
        {
                $('.def_currency_code').html('$');
        }
        else
        {
                $('.def_currency_code').html('€');
        }
}

function select_paypal_amoun(amount)
{
        if (posting_enc)
        {
                location = 'https://cc.cc/p/pay.php?posting_enc=' + posting_enc + '&amount=' + amount;
        }
        else
        {
                location = 'https://cc.cc/p/pay.php?sc=fajrin&amount=' + amount;
        }
}

function scrollExplore(dir){

    var el = document.getElementById("exploreImageList");

    el.scrollBy({
        left: dir * 300,
        behavior: "smooth"
    });

}

function loadExploreImages(img_size){
    $.ajax({
        url:"/short_code/explore_short_code_list.php?img_size="+img_size + "&t=" + new Date().getTime(),
        success:function(res){

                $("#exploreImageList").html(res);
                $("#exploreImageList").scrollLeft(0);
        }
    });

}

function openExplorePopup() {
        // Offcanvas 닫기
        let offcanvas = bootstrap.Offcanvas.getInstance('#offcanvasRight');
        if (offcanvas) {
                offcanvas.hide();
        }

        loadExploreImages('big');
        $("#exploreOverlay").show();
        $("#explorePopup").show();
}

function closeExplorePopup() {
        $("#exploreOverlay").hide();
        $("#explorePopup").hide();
}
</script>




<div id="bookmark_powered_tooltip" class="powered-bookmark-tooltip"></div>
<div class="powered-by">

<style>
.cc-simple-badge {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	padding: 8px 16px 8px 16px;
	background: #ffffff;
	border: 1.3px solid #766DF4;
	border-radius: 999px;
	box-shadow: 0 2px 8px rgba(118, 109, 244, 0.18);
	text-decoration: none;
	font-size: 11pt;
	transition: box-shadow 0.15s ease, transform 0.15s ease;
}

.cc-badge:hover strong {
	color: #ffffff;
}

.cc-simple-badge:hover {
	box-shadow: 0 3px 10px rgba(118, 109, 244, 0.25);
	transform: translateY(-1px);
}

.cc-address-dim {
	color: #888780;
}

.cc-address-brand {
	color: #766DF4;
	font-weight: 700;
}

.cc-address-cta {
	width: 24px;
	height: 24px;
	border-radius: 50%;
	background: #766DF4;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.cc-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	padding: 6px 12px;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	font-size: 16px;
	color: #6b6489;
	background: rgba(255, 255, 255, 0.85);
	backdrop-filter: blur(6px);
	-webkit-backdrop-filter: blur(6px);
	border: 1px solid rgba(118, 109, 244, 0.12);
	border-radius: 20px;
	text-decoration: none;
	letter-spacing: 0.01em;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
	transition: background 0.15s ease, box-shadow 0.15s ease;
}

.cc-dot {
	width: 6px;
	height: 6px;
	border-radius: 50%;
	background: #22c55e;
	display: inline-block;
}

.cc-badge strong {
	font-weight: 600;
	color: #766DF4;
}

.cc-badge:hover {
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 3px 10px rgba(0, 0, 0, 0.12);
}

</style>

<div id="cc-cta-big">
	<div>
		<a href='https://cc.cc' class="cc-simple-badge bg-primary">
                        <span class="text-white">Get your cc.cc</span>
		</a>
	</div>
</div>

<div id="cc-cta-small" style="display:none;">
        <a href='https://cc.cc' class="cc-badge btn-outline-primary">
                <span class="cc-dot"></span>
                Live on <strong>CC.CC</strong>
        </a>
</div>


<script>
(function() {

        function getCookie(name) {
                var m=document.cookie.match('(^|;)\\s*' + name + '\\s*=\\s*([^;]+)');
                return m ? decodeURIComponent(m.pop()) : '';
        }

        function ccCtaToggle() {
                var big=document.getElementById('cc-cta-big');
                var small=document.getElementById('cc-cta-small');

                var userAgent = navigator.userAgent;
                var isTwitter = userAgent.toLowerCase().includes('twitter');

                if (isTwitter)
                {
                        var big=document.getElementById('cc-cta-big');
                        var small=document.getElementById('cc-cta-small');

                        if (getCookie('_seen_cc_')) {
                                if (big) big.style.display='none';
                                if (small) small.style.display='none';
                        }

                        else {
                                if (big) big.style.display='none';
                                if (small) small.style.display='none';
                                $('#cc_cc_log_menu').show();
                        }
                }
                else
                {
                        var big=document.getElementById('cc-cta-big');
                        var small=document.getElementById('cc-cta-small');

                        if (getCookie('_seen_cc_')) {
                                if (big) big.style.display='none';
                                if (small) small.style.display='block';
                        }

                        else {
                                if (big) big.style.display='';
                                if (small) small.style.display='none';
                        }
                }
        }

        ccCtaToggle();

        window.addEventListener('pageshow', function(e) {
                        if (e.persisted) {
                                window.location.reload();
                                return;
                        }

                        ccCtaToggle();
                });
})();
</script>
</div>



<div class="modal fade" id="PayPalAccountSetup" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content" style='background-color:var(--bs-topnav-bg)'>
                        <div class="modal-body p-5">
                                <div class="position-absolute end-0 top-0 p-3">
                                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                                </div>
                                <form id='gift_paypal_account_email_form'>
                                <input type='hidden' name='short_code_val' value='aUljVHk0cS9wTGw5SXVPeFliUUIzSWR1eUpzZVM0U1ZPUTlReDl1QUVKOD0'>
                                <div class="auth-content">
                                        <div class="w-100">
                                                <div class="text-center mb-4">
                                                        <h5>Connect PayPal</h5>
                                                </div>

                                                <div class="mb-2">
                                                        <label class='mb-2'>Enter your PayPal account email address to accept payments.</label>
                                                        <input type="email" class="form-control mb-1" name="gift_paypal_account_email" id="gift_paypal_account_email" placeholder="PayPal Account Email"
                                                                        autocomplete="email" 
                                                                        autocorrect="off" 
                                                                        autocapitalize="off" 
                                                                        spellcheck="false">
                                                </div>

                                                <div class="mt-3 d-flex justify-content-between align-items-center" id="btn_gift_paypal_account_email">
                                                    <button type="submit"
                                                            class="btn btn-dark rounded-pill">
                                                        Connect                                                    </button>

                                                    <button type="button"
                                                            class="btn btn-outline-secondary rounded-pill"
                                                            id="btn_cancel_gift_paypal_account_email">
                                                        Disconnect                                                    </button>
                                                </div>

                                                <div class="spinner-border text-primary m-1"
                                                     role="status"
                                                     id="loading_gift_paypal_account_email"
                                                     style="display:none">
                                                </div>
                                       </div>
                                </div>
                                </form>
                        </div><!--end modal-body-->
                </div><!--end modal-content-->
        </div><!--end modal-dialog-->
</div>


<div class="modal fade"id="PayPalAmountSelect" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content" style='background-color:var(--bs-topnav-bg)'>
                        <div class="modal-body p-5">
                                <div class="position-absolute end-0 top-0 p-3">
                                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                                </div>
                                <div class="auth-content">
                                        <div class="w-100">
                                                <div class="text-center mb-4">
                                                        <h5>Select amount</h5>
                                                        <p class="text-muted">Choose an amount to send to Fajrin Indah</p>
                                                </div>

                                                <div class="text-center mb-2">
                                                        <a href="javascript:void(0)" onClick='select_paypal_amoun(1)' class="btn btn-outline-secondary rounded-pill w-100 text-start">
                                                                <span class='def_currency_code'>$</span>1.00 <span class='def_currency'>USD</span>
                                                        </a>
                                                </div>
                                                <div class="text-center mb-2">
                                                        <a href="javascript:void(0)" onClick='select_paypal_amoun(3)' class="btn btn-outline-secondary rounded-pill w-100 text-start">
                                                                <span class='def_currency_code'>$</span>3.00 <span class='def_currency'>USD</span>
                                                        </a>
                                                </div>

                                                <div class="text-center mb-2">
                                                        <a href="javascript:void(0)" onClick='select_paypal_amoun(5)' class="btn btn-outline-secondary rounded-pill w-100 text-start">
                                                                <span class='def_currency_code'>$</span>5.00 <span class='def_currency'>USD</span>
                                                        </a>
                                                </div>

                                                <div class="text-center mb-2">
                                                        <a href="javascript:void(0)" onClick='select_paypal_amoun(10)' class="btn btn-outline-secondary rounded-pill w-100 text-start">
                                                                <span class='def_currency_code'>$</span>10.00 <span class='def_currency'>USD</span>
                                                        </a>
                                                </div>

                                                <div class="text-center mb-2">
                                                        <a href="javascript:void(0)" onClick='select_paypal_amoun(30)' class="btn btn-outline-secondary rounded-pill w-100 text-start">
                                                                <span class='def_currency_code'>$</span>30.00 <span class='def_currency'>USD</span>
                                                        </a>
                                                </div>

                                                <div class="text-center mb-2">
                                                        <a href="javascript:void(0)" onClick='select_paypal_amoun(50)' class="btn btn-outline-secondary rounded-pill w-100 text-start">
                                                                <span class='def_currency_code'>$</span>50.00 <span class='def_currency'>USD</span>
                                                        </a>
                                                </div>

                                                <div class="text-center mb-2">
                                                        <a href="javascript:void(0)" onClick='select_paypal_amoun(100)' class="btn btn-outline-secondary rounded-pill w-100 text-start">
                                                                <span class='def_currency_code'>$</span>100.00 <span class='def_currency'>USD</span>
                                                        </a>
                                                </div>

                                                <div class='text-center mt-3'>
                                                        <a class="text-primary" href='https://www.paypal.com' target='_blank'>
                                                                <svg xmlns="http://www.w3.org/2000/svg"
                                                                     width="16"
                                                                     height="16"
                                                                     viewBox="0 0 16 16"
                                                                     fill="none"
                                                                     stroke="currentColor"
                                                                     stroke-width="1.5"
                                                                     stroke-linecap="round"
                                                                     stroke-linejoin="round">
                                                                    <rect x="3" y="7" width="10" height="7" rx="1.5"/>
                                                                    <path d="M5 7V5.5a3 3 0 0 1 6 0V7"/>
                                                                    <circle cx="8" cy="10" r="0.8" fill="currentColor" stroke="none"/>
                                                                </svg>
                                                                Secured by PayPal                                                        </a>
                                                </div>
                                        </div>
                                </div>
                        </div><!--end modal-body-->
                </div><!--end modal-content-->
        </div><!--end modal-dialog-->
</div>

<div class="modal fade" id="openLink" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content" style='background-color:var(--bs-topnav-bg)'>
                        <div class="modal-body">
                                <div class="auth-content">
                                        <div class="w-100 mt-3 mb-2">
                                                <div class="text-wrap h5">
                                                        Open this link?                                                </div>
                                        </div>
                                        <div class="w-100 mt-3 mb-1">
                                                <div class="text-wrap" id='confirm_link' style='word-break:break-all;' >
                                                </div>
                                        </div>
                                </div>
                        </div>

                        <div class="modal-footer"  style="border: none;">
                                <button type="button" class="btn btn-sm btn-secondary" data-bs-dismiss="modal">&nbspNo&nbsp</button>
                                <a id='link_url_href' class="btn btn-sm btn-primary" target='_blank' onClick="$('#openLink').modal('hide')">&nbsp&nbspYes&nbsp&nbsp</a>
                        </div>
                        <!--end modal-body-->
                </div>
                <!--end modal-content-->
        </div>
        <!--end modal-dialog-->
</div>


<!--Social Verified MODAL -->
<div class="modal fade" id="socialVerifiedModal" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content" style='background-color:var(--bs-topnav-bg)'>
                        <div class="modal-body p-5">
                                <div class="position-absolute end-0 top-0 p-3">
                                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                                </div>

                                <div class="auth-content">
                                        <div class="w-100">
                                                <h5 style='display: flex;align-items: center;gap: 8px;'>
                                                        <svg style='flex-shrink: 0;' width="24" height="24" viewBox="0 0 120 120" xmlns="http://www.w3.org/2000/svg">
                                                        <path d="M 51.96,14.60 Q 60.00,8.00 68.04,14.60 Q 76.07,21.20 86.42,22.21 Q 96.77,23.23 97.79,33.58 Q 98.80,43.93 105.40,51.96 Q 112.00,60.00 105.40,68.04 Q 98.80,76.07 97.79,86.42 Q 96.77,96.77 86.42,97.79 Q 76.07,98.80 68.04,105.40 Q 60.00,112.00 51.96,105.40 Q 43.93,98.80 33.58,97.79 Q 23.23,96.77 22.21,86.42 Q 21.20,76.07 14.60,68.04 Q 8.00,60.00 14.60,51.96 Q 21.20,43.93 22.21,33.58 Q 23.23,23.23 33.58,22.21 Q 43.93,21.20 51.96,14.60 Z" fill="#1D9BF0"/>
                                                        <path d="M40 61 L53 74 L81 45" stroke="#FFFFFF" stroke-width="9" stroke-linecap="round" stroke-linejoin="round" fill="none"/>
                                                        </svg>
                                                        Social Verified                                                </h5>
                                                This badge shows that this profile has been verified through the owner's social account.                                        </div>
                                </div>
                        </div>

                        <!--end modal-body-->
                </div>
                <!--end modal-content-->
        </div>
        <!--end modal-dialog-->
</div>




<!--Make your cc.cc MODAL -->
<div class="modal fade" id="modal_make_your_cc_cc" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content" style='background-color:var(--bs-topnav-bg)'>
                        <div class="modal-body p-5">
                                <div class="position-absolute end-0 top-0 p-3">
                                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                                </div>

                                <div class="auth-content">

                                        <div class="text-center mb-2">
                                            <button class="btn btn-outline-secondary rounded-pill w-100" id='popup-copy-link' 
                                                    data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-trigger="manual" title="Copied!">
                                                <span>Copy this link</span>
                                            </button>
                                        </div>
                                        <div class="text-center mb-2">
                                            <button class="btn btn-outline-secondary rounded-pill w-100" id='popup-copy-email' 
                                                    data-bs-toggle="tooltip" data-bs-placement="bottom" data-bs-trigger="manual" title="Copied!">
                                                <span>Copy email address</span>
                                            </button>
                                        </div>


                                        <hr class="my-4">

                                        <div class="w-100">
                                                Want a link, email, and page like this? Get yours free in 4 seconds.                                        </div>
                                </div>

                                <div class='mt-4'>
                                        <a href="https://cc.cc" class="btn btn-outline-primary rounded-pill" target="_blank">
                                                Claim your cc.cc                                        </a>
                                </div>
                        </div>

                        <!--end modal-body-->
                </div>
                <!--end modal-content-->
        </div>
        <!--end modal-dialog-->
</div>
<style>
#phone_no_qrcode canvas,
#viber_qrcode canvas,
#qq_qrcode canvas,
#phone_no_qrcode img,
#viber_qrcode img,
#qq_qrcode img {
    display: block;
    margin: 0 auto;
    border: 5px solid #fff;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
}


</style>
<!-- NOT CALL EMAIL -->
<div class="modal fade" id="notEmailModal" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content bg-primary-subtle">
                        <div class="modal-body">
                                <div class="auth-content">
                                        <div class="w-100">
                                                <div class="mt-1 text-center">
                                                        <a id='qr_code_email' class='fw-bold text-dark' style="word-wrap: break-word; white-space: normal; overflow-wrap: break-word;">
                                                                <span id='qr_code_email_view' class='text-primary' style='font-size:12pt'></span>
                                                                <div class='text-primary'>
                                                                        <svg xmlns="http://www.w3.org/2000/svg" width="36" height="36" viewBox="0 0 90 90" fill="currentColor">
                                                                        <path d="M87.6 25.849c-.003-.003-.003-.007-.006-.01-.008-.008-.018-.011-.026-.019-1.443-1.403-3.408-2.271-5.574-2.271H39.709c-2.162 0-4.123.865-5.565 2.263-.011.011-.026.015-.036.026-.004.004-.005.01-.009.015-1.477 1.453-2.396 3.472-2.396 5.703v26.89c0 4.414 3.592 8.006 8.007 8.006h42.284c4.414 0 8.006-3.592 8.006-8.006v-26.89c0-2.231-.921-4.251-2.4-5.704zM81.994 25.539c1.237 0 2.387.376 3.344 1.018L60.852 49.02 36.365 26.557c.957-.643 2.107-1.019 3.344-1.019h42.285zM88.009 58.446c0 3.317-2.699 6.016-6.016 6.016H39.709c-3.317 0-6.016-2.699-6.016-6.016v-26.89c0-1.361.46-2.614 1.225-3.624L53.524 45 41.589 55.949c-.405.372-.432 1.002-.06 1.407.196.214.465.323.734.323.24 0 .481-.087.673-.262l12.061-11.066 5.182 4.754c.191.174.432.262.673.262s.482-.087.673-.262l5.182-4.754 12.062 11.066c.191.175.432.262.673.262.269 0 .538-.109.734-.323.371-.404.344-1.034-.061-1.407L68.178 45.001l18.605-17.069c.765 1.009 1.225 2.263 1.225 3.624v26.89z"/>
                                                                        <path d="M24.796 45.996H6.573a.995.995 0 1 1 0-1.99h18.223a.995.995 0 1 1 0 1.99z"/>
                                                                        <path d="M24.796 55.95H12.151a.995.995 0 1 1 0-1.99h12.645a.995.995 0 1 1 0 1.99z"/>
                                                                        <path d="M24.796 36.041H.995a.995.995 0 1 1 0-1.99h23.801a.995.995 0 1 1 0 1.99z"/>
                                                                        </svg>
                                                                </div>
                                                        </a>
                                                </div>
                                        </div>
                                </div>
                        </div>
                        <!--end modal-body-->
                </div>
                <!--end modal-content-->
        </div>
        <!--end modal-dialog-->
</div>


<!-- Image Gallery MODAL -->
<div class="modal fade" id="imageGalleryModal" tabindex="-1" aria-hidden="true">
	<div class="modal-dialog modal-dialog-centered">
		<div class="modal-content" style="background-color: #78787f; border-color: #78787f;">
			<div class="modal-body">
				<div class="auth-content text-center" id="image_gallery_list" data-bs-dismiss="modal" aria-label="Close"></div>
				<div class="auth-content text-center" id="loading_image_gallery_list" style="display:none">
					<div class="spinner-border text-black m-1" role="status"></div>
				</div>
			</div>
			<!--end modal-body-->
		</div>
		<!--end modal-content-->
	</div>
	<!--end modal-dialog-->
</div>


<!-- paypal MEMO MODAL -->
<div class="modal fade" id="paypalMemoModal" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content" style='background-color:var(--bs-topnav-bg)'>
                        <div class="modal-body p-5">
                                <div class="position-absolute end-0 top-0 p-3">
                                        <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                                </div>

                                <div class="w-100">

                                        <div class="mb-3">
                                                <textarea class="form-control" id="paypal_memo" placeholder="Enter your message" rows="3" 
                                                                                                        autocomplete="on" 
                                                                                                        autocorrect="off" 
                                                                                                        autocapitalize="off" 
                                                                                                        spellcheck="false"></textarea>
                                        </div>
                                        <div class="mb-2">
                                                <form id='paypal_memo_form' class="auth-form">
                                                <input type='hidden' id='paypal_memo_btn'>
                                                <input type='hidden' id='paypal_memo_item_name'>
                                                <input type='hidden' id='paypal_memo_business'>
                                                <input type='hidden' id='paypal_memo_amount'>
                                                <input type='hidden' id='paypal_memo_currency_code'>
                                                <input type='hidden' id='paypal_memo_shipping'>
                                                <input type='hidden' id='paypal_memo_short_code_val'>
                                                <input type='hidden' id='paypal_memo_p'>
                                                </form>

                                                <button type="button" class="btn btn-dark rounded-pill" onClick='send_paypal()'>
                                                        Next                                                        <svg width="16" height="16" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
                                                        <path d="M4 12H20M20 12L14 6M20 12L14 18" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/>
                                                        </svg>
                                                </button>
                                        </div>
                                        <div class="mb-1 text-center">
                                                You will be redirected to PayPal for a secure payment.                                        </div>
                                </div>
                        </div>

			<!--end modal-body-->
		</div>
		<!--end modal-content-->
	</div>
	<!--end modal-dialog-->
</div>



<!-- Report This Link -->
<div class="modal fade" id="reportThisLinkModal" tabindex="-1" aria-hidden="true">
        <div class="modal-dialog modal-dialog-centered">
                <div class="modal-content" style='background-color:var(--bs-topnav-bg)'>
                        <div class="modal-header">
                                <h5 class="modal-title mt-0">Report this link</h5>
                                <button type="button" class="btn-close" data-bs-dismiss="modal" aria-label="Close"></button>
                        </div>
                        <div class="modal-body">
                                <div class="auth-content">
                                        <div class="w-100">
                                                <form id='report_this_link_form' class="auth-form">
                                                <input type='hidden' name='short_code' value='fajrin'>
                                                        <div class="mb-3">
                                                                <input type="email" class="form-control" id="report_this_link_email" name="email" maxlength=30 placeholder="Enter your email" autocomplete="email">
                                                        </div>

                                                        <div class="mb-3">
                                                                <textarea class="form-control" id="report_this_link_comments"  name="comments"  placeholder="Enter your message" rows="3" autocomplete="on"  required></textarea>
                                                        </div>

                                                        <div class="text-start">
                                                                <button type="submit" class="btn btn-dark rounded-pill" id='btn_report_this_link'>Report this link</button>
                                                                <div class="spinner-border text-primary m-1" role="status" id='loading_report_this_link' style='display:none'></div>
                                                        </div>
                                                </form>
                                        </div>
                                </div>
                        </div>
                        <!--end modal-body-->
                </div>
                <!--end modal-content-->
        </div>
        <!--end modal-dialog-->
</div>




<style>
.avatar-lg-send-tip {
        width: 40px;
        height: 40px;
}
</style>


<form target="paypal" action="https://www.paypal.com/cgi-bin/webscr" method="post" id='paypal_payment_form'>
<input type="hidden" name="cmd" value="_cart">
<input type="hidden" name="business" id="business" value="">
<input type="hidden" name="lc" value="US">
<input type="hidden" name="item_name" id="item_name" value="">
<input type="hidden" name="item_number" id="item_number" value="">
<input type="hidden" name="amount" id="amount" value="">
<input type="hidden" name="currency_code" id="currency_code" value="">
<input type="hidden" name="button_subtype" value="products">                                   
<input type="hidden" name="no_note" value="1">
<input type="hidden" name="no_shipping" id="no_shipping" value="">
<input type="hidden" name="address_override" id="address_override" value="">
<input type="hidden" name="rm" value="1">
<input type="hidden" name="add" value="1">
<input type="hidden" name="bn" value="PP-ShopCartBF:btn_cart_LG.gif:NonHosted">

<input type="hidden" name="on0" value="Memo">
<input type="hidden" name="os0" id='os0'value="">

<input type="hidden" name="return" id="return_url" value="">
<input type="hidden" name="cancel_return" id="cancel_return" value="">
<input type="hidden" name="notify_url" id="notify_url" value="">
<input type="hidden" name="charset" value="UTF-8">
</form>



</body>
</html>

<!-- JAVASCRIPT -->
<script src="https://short-img1.cc.cc/js/bootstrap.bundle.min.js"></script>
<script src="https://short-img1.cc.cc/js/bundle.js"></script>

<!-- Swiper Js -->
<script src="https://short-img1.cc.cc/js/swiper-bundle.min.js"></script>

<script src="https://short-img1.cc.cc/js/index.init.js"></script>
<script src="https://short-img1.cc.cc/js/heic2any.js"></script>
<script src="https://short-img1.cc.cc/js/call_cc_cc.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery.qrcode/1.0/jquery.qrcode.min.js"></script>

<script>
var whatsapp = '';


function open_link(confirm_ink,link_url)
{
        $('#confirm_link').html(confirm_ink);
        $('#link_url_href').attr('href', link_url);
        $('#openLink').modal('show');
}

function open_not_email()
{
        $('#notEmailModal').modal('show');
}

function open_not_call(w)
{
        openQRPopup('phone','<svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-phone-icon lucide-phone"><path d="M13.832 16.568a1 1 0 0 0 1.213-.303l.355-.465A2 2 0 0 1 17 15h3a2 2 0 0 1 2 2v3a2 2 0 0 1-2 2A18 18 0 0 1 2 4a2 2 0 0 1 2-2h3a2 2 0 0 1 2 2v3a2 2 0 0 1-.8 1.6l-.468.351a1 1 0 0 0-.292 1.233 14 14 0 0 0 6.392 6.384"/></svg> <span style="font-size:14pt">' + $.base64Decode('') + '</span>');
        click_call(w);
}

function isAndroid() {
        return /Android/i.test(navigator.userAgent);
}

function isIOS() {
        return /iPhone|iPad|iPod/i.test(navigator.userAgent);
}

function open_viber(number) {
  var userAgent = navigator.userAgent || navigator.vendor || window.opera;
  var phone = number.replace(/[^0-9+]/g, ''); // 안전하게 숫자만

  if (/android/i.test(userAgent)) {
    // Android
    window.location = "intent://add?number=" + encodeURIComponent(phone) +
                      "#Intent;scheme=viber;package=com.viber.voip;end;";
  } else if (/iPhone|iPad|iPod/.test(userAgent)) {
    // iOS
    window.location = "viber://add?number=" + encodeURIComponent(phone);
  } else {
    alert("");
  }
}


function open_qq(qqNumber) {
      var userAgent = navigator.userAgent || navigator.vendor || window.opera;

      var qqLink = 'mqqwpa://im/chat?chat_type=wpa&uin=' + qqNumber + '&version=1&src_type=web';

      if (/android/i.test(userAgent)) {
        // Android: QQ 앱 실행
        window.location = qqLink;

        // 2초 후 QQ 앱이 없으면 Play Store로 이동
        setTimeout(function() {
          window.location = "https://play.google.com/store/apps/details?id=com.tencent.mobileqq";
        }, 2000);

      } else if (/iPhone|iPad|iPod/.test(userAgent)) {
        // iOS: QQ 앱 실행
        window.location = qqLink;
      } else {
        alert("");
      }
}



function open_not_viber()
{
        openQRPopup('viber','<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48" width="16px" height="16px" style="vertical-align: top;"><path fill="#fff" d="M24,5C21.361,5,13.33,5,8.89,9.054C6.246,11.688,5,15.494,5,21v3c0,5.506,1.246,9.312,3.921,11.976 c1.332,1.215,3.148,2.186,5.368,2.857L15,39.047v5.328C15,45,15.181,45,15.241,45c0.123,0,0.32-0.039,0.694-0.371 c0.09-0.089,0.75-0.803,3.96-4.399l0.324-0.363l0.485,0.031C21.779,39.965,22.888,40,24,40c2.639,0,10.67,0,15.11-4.055 C41.753,33.311,43,29.505,43,24v-3c0-5.506-1.246-9.312-3.921-11.976C34.67,5,26.639,5,24,5z"></path><path fill="#7e57c2" d="M33.451 28.854c-1.111-.936-1.624-1.219-3.158-2.14C29.654 26.331 28.68 26 28.169 26c-.349 0-.767.267-1.023.523C26.49 27.179 26.275 28 25.125 28c-1.125 0-3.09-1.145-4.5-2.625C19.145 23.965 18 22 18 20.875c0-1.15.806-1.38 1.462-2.037C19.718 18.583 20 18.165 20 17.816c0-.511-.331-1.47-.714-2.109-.921-1.535-1.203-2.048-2.14-3.158-.317-.376-.678-.548-1.056-.549-.639-.001-1.478.316-2.046.739-.854.637-1.747 1.504-1.986 2.584-.032.147-.051.295-.057.443-.046 1.125.396 2.267.873 3.234 1.123 2.279 2.609 4.485 4.226 6.455.517.63 1.08 1.216 1.663 1.782.566.582 1.152 1.145 1.782 1.663 1.97 1.617 4.176 3.103 6.455 4.226.958.472 2.086.906 3.2.874.159-.005.318-.023.477-.058 1.08-.238 1.947-1.132 2.584-1.986.423-.568.74-1.406.739-2.046C33.999 29.532 33.827 29.171 33.451 28.854zM34 24c-.552 0-1-.448-1-1v-1c0-4.962-4.038-9-9-9-.552 0-1-.448-1-1s.448-1 1-1c6.065 0 11 4.935 11 11v1C35 23.552 34.552 24 34 24zM27.858 22c-.444 0-.85-.298-.967-.748-.274-1.051-1.094-1.872-2.141-2.142-.535-.139-.856-.684-.718-1.219.138-.534.682-.855 1.219-.718 1.748.453 3.118 1.822 3.575 3.574.139.535-.181 1.08-.715 1.22C28.026 21.989 27.941 22 27.858 22z"></path><path fill="#7e57c2" d="M31,23c-0.552,0-1-0.448-1-1c0-3.188-2.494-5.818-5.678-5.986c-0.552-0.029-0.975-0.5-0.946-1.051 c0.029-0.552,0.508-0.976,1.051-0.946C28.674,14.241,32,17.748,32,22C32,22.552,31.552,23,31,23z"></path><path fill="#7e57c2" d="M24,4C19.5,4,12.488,4.414,8.216,8.316C5.196,11.323,4,15.541,4,21c0,0.452-0.002,0.956,0.002,1.5 C3.998,23.043,4,23.547,4,23.999c0,5.459,1.196,9.677,4.216,12.684c1.626,1.485,3.654,2.462,5.784,3.106v4.586 C14,45.971,15.049,46,15.241,46h0.009c0.494-0.002,0.921-0.244,1.349-0.624c0.161-0.143,2.02-2.215,4.042-4.481 C21.845,40.972,22.989,41,23.999,41c0,0,0,0,0,0s0,0,0,0c4.5,0,11.511-0.415,15.784-4.317c3.019-3.006,4.216-7.225,4.216-12.684 c0-0.452,0.002-0.956-0.002-1.5c0.004-0.544,0.002-1.047,0.002-1.5c0-5.459-1.196-9.677-4.216-12.684C35.511,4.414,28.5,4,24,4z M41,23.651l0,0.348c0,4.906-1.045,8.249-3.286,10.512C33.832,38,26.437,38,23.999,38c-0.742,0-1.946-0.001-3.367-0.1 C20.237,38.344,16,43.083,16,43.083V37.22c-2.104-0.505-4.183-1.333-5.714-2.708C8.045,32.248,7,28.905,7,23.999l0-0.348 c0-0.351-0.001-0.73,0.002-1.173C6.999,22.078,6.999,21.7,7,21.348L7,21c0-4.906,1.045-8.249,3.286-10.512 C14.167,6.999,21.563,6.999,24,6.999c2.437,0,9.832,0,13.713,3.489c2.242,2.263,3.286,5.606,3.286,10.512l0,0.348 c0,0.351,0.001,0.73-0.002,1.173C41,22.922,41,23.3,41,23.651z"></path></svg>  <span style="font-size:14pt">' + $.base64Decode('')  +'</span>');
}

function open_not_qq()
{
        openQRPopup('qq','<svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="16px" height="16px" fill="#1EBAFC" style="vertical-align: top;"><path d="M21.395 15.035a40 40 0 0 0-.803-2.264l-1.079-2.695c.001-.032.014-.562.014-.836C19.526 4.632 17.351 0 12 0S4.474 4.632 4.474 9.241c0 .274.013.804.014.836l-1.08 2.695a39 39 0 0 0-.802 2.264c-1.021 3.283-.69 4.643-.438 4.673.54.065 2.103-2.472 2.103-2.472 0 1.469.756 3.387 2.394 4.771-.612.188-1.363.479-1.845.835-.434.32-.379.646-.301.778.343.578 5.883.369 7.482.189 1.6.18 7.14.389 7.483-.189.078-.132.132-.458-.301-.778-.483-.356-1.233-.646-1.846-.836 1.637-1.384 2.393-3.302 2.393-4.771 0 0 1.563 2.537 2.103 2.472.251-.03.581-1.39-.438-4.673"/></svg>  <span style="font-size:14pt">' + $.base64Decode('')  +'</span>');
}

function openWhatsApp() {
                location = 'https://wa.me/' + whatsapp.replace(/[^0-9]/g, '');
}


function pay_now(btn,short_code_val,p,item_name,business,amount,currency_code,shipping)
{
        $('#paypal_memo_btn').val(btn);
        $('#paypal_memo_item_name').val(item_name);
        $('#paypal_memo_business').val(business);
        $('#paypal_memo_amount').val(amount);
        $('#paypal_memo_currency_code').val(currency_code);
        $('#paypal_memo_shipping').val(shipping);


        $('#paypal_memo_short_code_val').val(short_code_val);
        $('#paypal_memo_p').val(p);

        $('#paypalMemoModal').modal('show');
        $('#paypal_memo').val('');
}


function send_paypal()
{
        $('#paypalMemoModal').modal('hide');

        $('#pay_now_btn_' + $('#paypal_memo_btn').val()).hide();

        $('#item_name').val($('#paypal_memo_item_name').val());
        $('#business').val($('#paypal_memo_business').val());
        $('#amount').val($('#paypal_memo_amount').val());
        $('#currency_code').val($('#paypal_memo_currency_code').val());

        if ($('#paypal_memo_shipping').val() == "y")
        {
                $('#no_shipping').val(0);
                $('#address_override').val(0);
        }
        else
        {
                $('#no_shipping').val(1);
                $('#address_override').val(0);
        }

        $('#os0').val($.trim($('#paypal_memo').val()));

        var formData = $('#paypal_payment_form').serialize();
        formData += '&short_code_val=' + $('#paypal_memo_short_code_val').val() + '&p='+$('#paypal_memo_p').val() + '&shipping=' + $('#paypal_memo_shipping').val() + '&act='+$('#paypal_payment_form').attr('action');

         $.ajax({
                type: 'POST',
                url: '/short_code/posting_paypal_cart_order_no_ajax.php',
                data:formData,
				xhrFields: {
					withCredentials: true
				},
                success: function(res) {

                        $('#pay_now_btn_' + $('#paypal_memo_btn').val()).show();

                        res_json = $.parseJSON(res);
                        if (res_json.proc == '1')
                        {
                                $('#item_number').val(res_json.item_number);
                                $('#return_url').val(res_json.return_url);
                                $('#notify_url').val(res_json.notify_url);
                                $('#cancel_return').val(res_json.cancel_return);
                                $('#paypal_payment_form').submit();

                                save_posting_payment_submit_log();
                        }
                        else
                        {
								
                                document.location.reload();
                        }

                        return false;
                }
        });

//        alert('no_shipping : ' + $('#no_shipping').val() + '\naddress_override:' + $('#address_override').val());
}



function save_posting_payment_submit_log(payment_cart_no)
{
        var formData = $('#paypal_payment_form').serialize();

         $.ajax({
                type: 'POST',
                url: 'https://cc.cc/short_code/posting_paypal_cart_submit_save_log_ajax.php',
                data:formData,
				xhrFields: {
					withCredentials: true
				},
                success: function(res) {

//                        console.log(res);

                        return false;
                }
        });
}

function click_call(w)
{
        var url = '/short_code/click_short_code_proc_ajax.php';
        var params = 'c=' + w;

//        console.log('params',params);

        $.ajax({
                type:'GET',
                url:url,
                data:params,
                xhrFields: {
                        withCredentials: true
                },
                contentType: "charset=utf-8",
                success: function(res) {
//                        console.log(res);
                }
        });
}


function get_call_short_code()
{
//        console.log('call_short_code');


        var url = '/short_code/get_short_code_info_ajax.php';
        var params = Math.random();

        $.ajax({
                type:'GET',
                url:url,
                data:params,
                contentType: "charset=utf-8",
                success: function(res) {

//                        console.log(res);
                        var res_json = $.parseJSON(res);

                        if (res_json.proc == '1')
                        {
                                $('#qr_code_phone_no').html(res_json.short_phone_no);
                                $('#qr_code_viber').html(res_json.short_viber);
                                $('#qr_code_qq').html(res_json.short_qq);

                                $('#qr_code_email').attr('href', 'mailto:'+res_json.exposure_email);
                                $('#qr_code_email_view').html(res_json.exposure_email);

                                $('#call_phone_no_img').attr('href', 'tel:' + res_json.short_phone_no_simple);
                                $('#call_phone_no').attr('href', 'tel:' + res_json.short_phone_no_simple);

//                                console.log(res_json.short_phone_no_simple);

//                                whatsapp = res_json.short_whats_app;
                        }
                }
        });

        return false;
}

function showTooltip(event) {
        var tooltip = document.getElementById('tooltip');
        tooltip.classList.add('tooltip-show');
        setTimeout(function() {
        tooltip.classList.remove('tooltip-show');
        }, 3000);
}

$(window).on("load", function() {
	
        const newUrl = '/';
        window.history.replaceState({}, '', newUrl);
});


function save_send_tip_payment_submit_log()
{
        var formData = $('#paypal_payment_form').serialize();

         $.ajax({
                type: 'POST',
                url: '/short_code/send_tip_paypal_cart_submit_save_log_ajax.php',
                data:formData,
                success: function(res) {

//                        console.log(res);
                        return false;
                }
        });
}

function report_this_link_proc(event)
{
        $('#loading_report_this_link').show();
        $('#btn_report_this_link').hide();

        var formData = $('#report_this_link_form').serialize();
        var url = '/short_code/save_short_code_report_link_proc_ajax.php';

        $.ajax({
                type: 'POST',
                url: url,
                data: formData,
				xhrFields: {
					withCredentials: true
				},
                success: function(res) {

                        $('#loading_report_this_link').hide();
                        $('#btn_report_this_link').show();
                        $('#reportThisLinkModal').modal('hide');


                        $('#report_this_link_email').val('');
                        $('#report_this_link_comments').val('');

//                        console.log(res);
                        res_json = $.parseJSON(res);
                        alert(res_json.mssg);
                },
                error: function(error) {
                }
        });
        return false;
}

$(window).on('load', function () {

    const data = new URLSearchParams({
        ref: document.referrer
    });

    navigator.sendBeacon(
        '/short_code/visit_short_code_proc_ajax.php',
        data
    );
});



$(document).ready(function() {

        $('#report_this_link_form').on('submit', function(event) {
                event.preventDefault(); // 폼 제출을 막음
                report_this_link_proc(); // AJAX 요청 처리
        });




        // Initialize tooltip
        var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
        var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
                return new bootstrap.Tooltip(tooltipTriggerEl)
        });

        $(document).on('show.bs.tooltip', function (e) {
                setTimeout(function() {   
                $('[data-bs-toggle="tooltip"]').tooltip('hide');
//                console.log('destroy tooltip');
                }, 3000);
        });



//        get_call_short_code();

})


function open_image_gallery(p)
{
        $('#imageGalleryModal').modal('show');
        $('#image_gallery_list').hide();
        $('#loading_image_gallery_list').show();

        var url = '/short_code/get_short_code_posting_image_gallery_list_ajax.php';
        var params = 'short_code_val=aUljVHk0cS9wTGw5SXVPeFliUUIzSWR1eUpzZVM0U1ZPUTlReDl1QUVKOD0&p=' + p + '&' + Math.random();

        $.ajax({
                type:'GET',
                url:url,
                data:params,
                contentType: "charset=utf-8",
                success: function(res) {
//                        console.log(res)
                        $('#image_gallery_list').html(res);
                        $('#image_gallery_list img').on('load', function () {
                                        $('#image_gallery_list').show();
                                        $('#loading_image_gallery_list').hide();
                                }).on('error', function () {
                        });
                }
        });

        return false;
}

</script>

<script>
var google_state='';
var apple_state='';

var cookieConsentRes = null;   // 전역변수, 쿠키 비동의 후 google , apple 클릭시 refer 상태 알기


async function get_sign_in() {
    var url = '/account/get_sign_in_ajax.php';
    var params = Math.random();

//    console.log('get_sign_in 시작');

    // Promise로 $.ajax 래핑
    return new Promise((resolve, reject) => {
        $.ajax({
            type: 'GET',
            url: url,
            data: { params: params }, // 객체 형태로 수정
            contentType: "charset=utf-8",
            success: function(res) {
//                console.log('AJAX 성공:', res);
                try {
                    var res_json = $.parseJSON(res);
//                    console.log('res_json:', res_json);
                    resolve(res_json.email); // 성공 시 Promise resolve
                } catch (e) {
//                    console.error('JSON 파싱 오류:', e);
                    reject(e);
                }
            },
            error: function(error) {
//                console.log('AJAX 오류:', error);
                reject(error); // 실패 시 Promise reject
            }
        });
    });
}


async function sign_up_proc(event) {
    event.preventDefault(); // 폼의 기본 제출 동작을 방지

        var sign_up_password = $.trim($('#sign_up_password').val());

        if (sign_up_password.length < 4)
        {
                $('#sign_up_error').html('Password is too short. It should be at least 4 characters long.');
                $('#sign_up_error').show();
                return false;
        }


    try {
            /*
        let sign_in_email = await get_sign_in();
//        console.log('sign_in_email:', sign_in_email);

        if (sign_in_email) {
                document.location.reload();
                return false;
        }
        */

        var formData = $('#sign_up_form').serialize();
        var url = '/account/sign_up_proc_ajax.php';

        $('#sign_up_submit').hide();
        $('#sign_up_loading').show();
        $('#sign_up_result').hide();
        $('#sign_up_error').hide();

//        console.log('formData:', formData);

        $.ajax({
            type: 'POST',
            url: url,
            data: formData,
            success: function(res) {
//                console.log('회원가입 성공:', res);
                var res_json = $.parseJSON(res);

                if (res_json.proc == '1') {
                        if (res_json.loc !== undefined && res_json.loc)
                        {
                                if (res_json.loc == 'create')
                                {
                                        close_sign_modal();
                                        launch_your_link();
                                }
                                else
                                {
                                        if (parseInt(res_json.short_code_count)>0)
                                        {
                                                // console.log('res_json.short_code_count');

                                                if (res_json.loc.indexOf("https://") !== -1)
                                                {
                                                        location = res_json.loc;
                                                }
                                                else
                                                {
                                                        setup_link_proc();
                                                }
                                        }
                                        else
                                        {
                                                // 내소유 short code count가 없으면
                                                // console.log('location');
                                                location = 'https://cc.cc';
                                        }
                                }
                        }
                        else
                        {
                                if (parseInt(res_json.short_code_count)>0)
                                {
                                        location.reload();
                                }
                                else
                                {
                                        // 내소유 short code count가 없으면
                                        //        console.log('location2');
                                        location = 'https://cc.cc';
                                }
                        }
                }
                else
                {
                        $('#sign_up_submit').show();
                        $('#sign_up_loading').hide();
                        $('#sign_up_error').html(res_json.mssg);
                        $('#sign_up_error').show();
                }
            },
            error: function(error) {
//                console.log('회원가입 오류:', error);
            }
        });
    } catch (error) {
//        console.error('get_sign_in 오류:', error);
    }
    return false;
}

async function forgot_password_proc(event) {
    event.preventDefault(); // 폼의 기본 제출 동작을 방지
    
    try {
        let sign_in_email = await get_sign_in();

        if (sign_in_email) {

                document.location.reload();
                return false;
        }

        var formData = $('#forgot_password_form').serialize();
        var url = '/account/forgot_password_proc_ajax.php';

        $('#forgot_password_submit').hide();
        $('#forgot_password_loading').show();
        $('#forgot_password_result').hide();
        $('#forgot_password_error').hide();


        $.ajax({
            type: 'POST',
            url: url,
            data: formData,
            success: function(res) {
//                console.log(res);

                var res_json = $.parseJSON(res);

                $('#forgot_password_loading').hide();

                if (res_json.proc == '1') {
                        $('#forgot_password_result').html(res_json.mssg);
                        $('#forgot_password_result').show();
                }
                else
                if (res_json.proc == '2') {
                        $('#btn-google-login').show();
                }
                else {
                        $('#forgot_password_submit').show();
                        $('#forgot_password_error').html(res_json.mssg);
                        $('#forgot_password_error').show();
                }
            },
            error: function(error) {
            }
        });
    } catch (error) {
//        console.error('get_sign_in 오류:', error);
    }
    return false;
}

async function sign_in_proc(event) {
    event.preventDefault(); // 폼의 기본 제출 동작을 방지

//    console.log('sign_in_proc 시작');
    
    try {
        let sign_in_email = await get_sign_in();
//        console.log('sign_in_email:', sign_in_email);

        if (sign_in_email) {
                document.location.reload();
                return false;
        }

        var formData = $('#sign_in_form').serialize();
        var url = '/account/sign_in_proc_ajax.php';

//        console.log('formData:', formData);

        $.ajax({
            type: 'POST',
            url: url,
            data: formData,
            success: function(res) {
//                console.log('로그인 성공:', res);

                var res_json = $.parseJSON(res);

                if (res_json.proc == '1')
                {
                        if (res_json.loc !== undefined && res_json.loc)
                        {
                                if (res_json.loc == 'create')
                                {
                                        launch_your_link();
                                }
                                else
                                {
                                        if (parseInt(res_json.short_code_count)>0)
                                        {
//                                                console.log('res_json.short_code_count');

                                                if (res_json.loc.indexOf("https://") !== -1)
                                                {
                                                        location = res_json.loc;
                                                }
                                                else
                                                {
                                                        setup_link_proc();
                                                }
                                        }
                                        else
                                        {
                                                // 내소유 short code count가 없으면
//                                                console.log('location');
                                                location = 'https://cc.cc/?auth=verified';
                                        }
                                }
                        }
                        else
                        {
                                if (parseInt(res_json.short_code_count)>0)
                                {
                                        location.reload();
                                }
                                else
                                {
                                        // 내소유 short code count가 없으면
//                                                console.log('location2');
                                        location = 'https://cc.cc/?auth=verified';
                                }

                        }
                }
                else
                if (res_json.proc == '2')
                {
                        $('#google-login').trigger('click');
                }
                else {
                    alert(res_json.mssg);
                }
            },
            error: function(error) {
//                console.log('로그인 오류:', error);
            }
        });
    } catch (error) {
//        console.error('get_sign_in 오류:', error);
    }
    return false;
}

function close_sign_modal()
{
        $('#signInModal').modal('hide');
        $('#signUpModal').modal('hide');
}

async function sign_up(title)
{
        let sign_in_email = await get_sign_in();

        if (sign_in_email)
        {
                document.location.reload();
                return false;
        }

        $('#signInModal').modal('hide');
        $('#signUpModal').modal('show');


        if (title)
        {
                $('#modal-title').html(title);
        }

        normalizeSignModalGoogleAuthUi();
}

async function sign_in()
{
        $('#signin_google_login_layer .divider').show();
        $('#sign_in_form').show();
        $('#btn_sign_up_modal').show();

        $('#signUpModal').modal('hide');
        $('#signInModal').modal('show');

        normalizeSignModalGoogleAuthUi();
}

function open_forgot_password()
{
        $('#signInModal').modal('hide');

        $('#forgot_email').val('');
        $('#forgot_password_submit').show();

        $('#forgot_password_loading').hide();
        $('#forgot_password_result').hide();
        $('#forgot_password_error').hide();

        $('#btn-google-login').hide();

        $('#forgotPasswordModal').modal('show');
}


function get_twitter()
{
        var ua = navigator.userAgent.toLowerCase();
        var isTwitter = ua.includes('twitter') &&
                (ua.includes('iphone') || ua.includes('android'));

        // return isTwitter || 0;
        return isTwitter;
}

function isInAppBrowser()
{
        var ua = navigator.userAgent.toLowerCase();

        var knownTokens = [
                'fban',
                'fbav',
                'instagram',
                'twitter',
                'line/',
                'kakaotalk',
                'kakaostory',
                'naver',
                'naverblog',
                'navercafe',
                'naverapp',
                'naver(inapp',
                'band',
                'daumapps',
                'daum',
                'tiktok',
                'musical_ly',
                'whatsapp',
                'micromessenger',
                'snapchat',
                'pinterest',
                'telegram',
                'discord',
                'reddit',
                'linkedin',
                'linkedinapp',
                'tumblr',
                'threads',
                'everytimeapp',
                'naversearchapp'
        ];

        for (var i = 0; i < knownTokens.length; i++)
        {
                if (ua.indexOf(knownTokens[i]) !== -1)
                {
                        return true;
                }
        }

        var isIOSDevice = /iphone|ipad|ipod/.test(ua);

        if (isIOSDevice && ua.indexOf('safari') === -1)
        {
                return true;
        }

        if (ua.indexOf('; wv)') !== -1 || ua.indexOf(' wv)') !== -1)
        {
                return true;
        }

        return false;
}

function getGoogleAuthPlatform()
{
        var ua = navigator.userAgent.toLowerCase();

        if (ua.indexOf('android') !== -1)
        {
                return 'android';
        }

        if (/iphone|ipad|ipod/.test(ua))
        {
                return 'ios';
        }

        return 'other';
}

function shouldHideGoogleSignupInApp()
{
        if (!isInAppBrowser())
        {
                return false;
        }

        // Android in-app browsers keep Google signup available.
        // iOS and unclassified in-app browsers retain the existing hidden behavior.
        return getGoogleAuthPlatform() !== 'android';
}

function showGoogleLoginInAppNotice()
{
        var message = "It looks like you're using an in-app browser. If Google Sign-In doesn't work, please open this page in Safari or Chrome and try again.";

        var noticeHtml =
                '<div class="google-inapp-notice mt-2 text-secondary fw-light small">' +
                message +
                '</div>';

        $('.google-inapp-notice').remove();

        $('#signin_google_login_layer .text-center')
                .first()
                .append(noticeHtml);

        if (!shouldHideGoogleSignupInApp())
        {
                $('#signup_google_login_layer .text-center')
                        .first()
                        .append(noticeHtml);
        }
}

function normalizeSignModalGoogleAuthUi()
{
        if (!shouldHideGoogleSignupInApp())
        {
                if ($('#signup_google_login_layer').css('display') !== 'none')
                {
                        $('#easy_sign_up_divider').show();
                }
                else
                {
                        $('#easy_sign_up_divider').hide();
                }

                return;
        }

        $('#easy_sign_up_divider').hide();
        $('#signup_google_login_layer').hide();
}

function handleGoogleLoginForInAppBrowser()
{
        if (isInAppBrowser())
        {
                // 인앱 로그인에서는 안내문구를 보여주고 Google 로그인 클릭은 허용함.
                showGoogleLoginInAppNotice();
                normalizeSignModalGoogleAuthUi();
        }

        return false;
}

  
function openGoogleLoginPopup() {
        const clientId = '325463998746-2enue4cl5ci2llpjphtull2rvsedv94p.apps.googleusercontent.com';  // 여기에 실제 클라이언트 ID를 입력하세요.
        const width = 600;
        const height = 700;
        const left = (screen.width / 2) - (width / 2);
        const top = (screen.height / 2) - (height / 2);

        const url = `https://accounts.google.com/o/oauth2/v2/auth?` +
                    `client_id=${clientId}&` +
                    `response_type=token&` +
                    `redirect_uri=${encodeURIComponent('https://cc.cc/open_id/google_login_refer.php')}&` +
                    `scope=${encodeURIComponent('email profile')}&` +
                    `include_granted_scopes=true&` +
                    `state=${encodeURIComponent(google_state)}`;

        // 모든 환경(PC/안드로이드/iOS) 동일하게 팝업 방식 사용
        const loginWindow = window.open(url, 'Google Login', `width=${width},height=${height},top=${top},left=${left}`);

        // 팝업이 차단되었을 경우 경고창 안내
        if (!loginWindow || loginWindow.closed || typeof loginWindow.closed === 'undefined') {
            alert("Unable to open the pop-up window for Google login. Please check your browser's pop-up blocker or Screen Time settings.");
            return;
        }

        // 팝업 창이 닫히는 것을 감지하는 타이머
        const timer = setInterval(() => {
            if (loginWindow.closed) {
                clearInterval(timer);
                console.log("The Google login window has been closed.");
            }
        }, 1000);
}

/* function openGoogleLoginPopup() {
        const clientId = '325463998746-2enue4cl5ci2llpjphtull2rvsedv94p.apps.googleusercontent.com';  // 여기에 실제 클라이언트 ID를 입력하세요.
        const width = 600;
        const height = 700;
        const left = (screen.width / 2) - (width / 2);
        const top = (screen.height / 2) - (height / 2);

        const url = `https://accounts.google.com/o/oauth2/v2/auth?` +
                    `client_id=${clientId}&` +
                    `response_type=token&` +
                    `redirect_uri=${encodeURIComponent('https://cc.cc/open_id/google_login_refer.php')}&` +
                    `scope=${encodeURIComponent('email profile')}&` +
                    `include_granted_scopes=true&` +
                    `state=${encodeURIComponent(google_state)}`;

        // 1. 아이폰, 아이패드 등 iOS 기기인지 감지 (User Agent 및 터치 포인트 체크)
        const isIOS = /iPad|iPhone|iPod/.test(navigator.userAgent) || 
                      (navigator.platform === 'MacIntel' && navigator.maxTouchPoints > 1);

        if (isIOS) {
            // [아이폰 환경] 팝업 차단 및 스크린 타임을 우회하기 위해 현재 창을 구글로 이동
            window.location.href = url;
        } else {
            // [PC 및 안드로이드 환경] 기존 방식대로 팝업 창을 오픈
            const loginWindow = window.open(url, 'Google Login', `width=${width},height=${height},top=${top},left=${left}`);
            
            // 만약 다른 환경에서도 팝업이 차단되었을 경우 경고창 안내 (영어 번역본 적용)
            if (!loginWindow || loginWindow.closed || typeof loginWindow.closed === 'undefined') {
                alert("Unable to open the pop-up window for Google login. Please check your browser's pop-up blocker or Screen Time settings.");
                return;
            }

            // 팝업 창이 닫히는 것을 감지하는 타이머 (PC/안드로이드용)
            const timer = setInterval(() => {
                if (loginWindow.closed) {
                    clearInterval(timer);
                    console.log("The Google login window has been closed.");
                }
            }, 1000);
        }
} */
/*
function openGoogleLoginPopup() {
        const clientId = '325463998746-2enue4cl5ci2llpjphtull2rvsedv94p.apps.googleusercontent.com';  // 여기에 실제 클라이언트 ID를 입력하세요.
        const width = 600;
        const height = 700;
        const left = (screen.width / 2) - (width / 2);
        const top = (screen.height / 2) - (height / 2);

        const url = `https://accounts.google.com/o/oauth2/v2/auth?` +
                                        `client_id=${clientId}&` +
                                        `response_type=token&` +
                                        `redirect_uri=${encodeURIComponent('https://cc.cc/open_id/google_login_refer.php')}&` +
                                        `scope=${encodeURIComponent('email profile')}&` +
                                        `include_granted_scopes=true&` +
                                        `state=${encodeURIComponent(google_state)}`;

        window.open(url, 'Google Login', `width=${width},height=${height},top=${top},left=${left}`);
}
*/
function setConsentSign(val) {
        const cookieVal = encodeURIComponent(JSON.stringify(val));
        const maxAge = 60 * 60 * 24 * 180; // 180일
        // .cc.cc 및 서브도메인용 쿠키
        document.cookie = `cc_consent=${cookieVal}; path=/; max-age=${maxAge}; domain=.cc.cc`;
}


['google-login', 'google-login2', 'google-login-signup'].forEach(id => {

    const el = document.getElementById(id);
    if (el) {
        el.addEventListener('click', function (e) {
            if (handleGoogleLoginForInAppBrowser()) {
                        e.preventDefault();
                        return false;
            }

            // 기존 Twitter/X 전용 안내 분기는 인앱 안내문구 처리로 대체되어 비활성화함.
            if (false && get_twitter())
            {
                        e.preventDefault();

                        const $el = $(this);
                        const offset = $el.offset();

                        const message = "Since you’re in the Twitter app, Google login won’t work. Try another login method or open this page in a browser.";

                        // 기존 툴팁 제거 (중복 방지)
                        $('.tooltip-custom-click').remove();

                        // 툴팁 요소 생성
                        const $tooltip = $('<div class="tooltip-custom-click tooltip-show">' + message + '</div>');

                        $('body').append($tooltip);

                        // 먼저 스타일 적용해서 너비 제한 및 줄바꿈 허용
                        $tooltip.css({
                            position: 'absolute',
                            backgroundColor: '#1da1f2',
                            color: '#ffffff',
                            padding: '8px 12px',
                            borderRadius: '4px',
                            fontSize: '14px',
                            whiteSpace: 'normal',        // 자동 줄바꿈 허용
                            maxWidth: '300px',           // 최대 너비 300px
                            zIndex: 9999,
                            boxShadow: '0 2px 8px rgba(0,0,0,0.2)'
                        });

                        // 툴팁 실제 너비 구함
                        const tooltipWidth = $tooltip.outerWidth();

                        // 위치 재계산 (버튼 아래 중앙 정렬)
                        const left = offset.left + ($el.outerWidth() / 2) - (tooltipWidth / 2);
                        const top = offset.top + $el.outerHeight() + 8;

                        $tooltip.css({ left: `${left}px`, top: `${top}px` });

                        // 3초 후 툴팁 자동 제거
                        setTimeout(function () {
                            $tooltip.fadeOut(300, function () {
                                $(this).remove();
                            });
                        }, 3000);
                }
                else
                {
                        // 트위터 브라우저가 아닌 경우 정상 로그인 팝업 실행
//                        console.log('google-login Click');

                        if (typeof window.cookieConsentRes !== 'undefined' && window.cookieConsentRes)
                        {
//                                console.log('cookieConsentRes.refer_stat',window.cookieConsentRes.refer_stat);

                                if (window.cookieConsentRes && window.cookieConsentRes.refer_stat === 1)
                                {
                                        if (window.cookieConsentRes.functional !== 1)
                                        {
                                                // refer 상태 good이고 쿠키동의 하지 않은 상태에서 구글버튼 클릭하면 강제 동의 처리한다
//                                                $('#cc-accept').trigger('click');

                                                        setConsentSign({
                                                                essential: 1,
                                                                functional: 1,
                                                                marketing: 1,
                                                                ts: Date.now()
                                                        });
                                        }

                                        // 쿠키 동의 하지 않은 상태에 구글 관련 script가 생성되어 있지 않다.
                                        // 이 문장은 functional true일때 자동으로 cookie_consent.js에서 처리한다.
                                        if (!document.getElementById('google-gsi'))
                                        {
                                                const gScript = document.createElement('script');
                                                gScript.id = 'google-gsi';
                                                gScript.src = 'https://accounts.google.com/gsi/client';
                                                gScript.async = true;

                                                gScript.onload = function () {
                                                        openGoogleLoginPopup(e);
                                                };

                                                document.head.appendChild(gScript);
                                        }
                                }
                        }

                        // 여기 까지왔다는 것은 refer good 상태 또는 functional = 1 상태
                        // 이미 로드된 경우
                        openGoogleLoginPopup(e);
                }

        });
    }
});





function openAppleLoginPopup() {
        const width = 600;
        const height = 700;
        const left = (screen.width / 2) - (width / 2);
        const top = (screen.height / 2) - (height / 2);

        if (typeof window.cookieConsentRes !== 'undefined' && window.cookieConsentRes)
        {
//                console.log('cookieConsentRes.refer_stat',window.cookieConsentRes.refer_stat);

                if (window.cookieConsentRes && window.cookieConsentRes.refer_stat === 1)
                {
                        if (window.cookieConsentRes.functional !== 1)
                        {
                                // refer 상태 good이고 쿠키동의 하지 않은 상태에서 구글버튼 클릭하면 강제 동의 처리한다
//                                                $('#cc-accept').trigger('click');

                                        setConsentSign({
                                                essential: 1,
                                                functional: 1,
                                                marketing: 1,
                                                ts: Date.now()
                                        });
                        }
                }
        }

        const url = 'https://cc.cc/open_id/signin_with_apple.php?state='+apple_state;
        window.open(url, 'Apple Login', `width=${width},height=${height},top=${top},left=${left}`);
}

['apple-login', 'apple-login-signup'].forEach(id => {
    const el = document.getElementById(id);
    if (el) {
        el.addEventListener('click', openAppleLoginPopup);
    }
});


$(document).ready(function() {
        $('#easy_sign_up_layer').hide();
        handleGoogleLoginForInAppBrowser();

        $(document).on('cookieConsentReady', function () {
                handleGoogleLoginForInAppBrowser();
        });
        /*
        if (get_twitter()) {
                // 트위터 브라우저 인가?
                $('#signup_google_login_layer').hide();
                $('#signin_google_login_layer').hide();
        }
        */

        $('#sign_up_password').on('input', function() {
                var value = $(this).val();
                // Remove spaces from the input
                $(this).val(value.replace(/\s/g, ''));
        });

        $('#sign_up_password').on('keypress', function(e) {
                // Prevent space key from being pressed
                if (e.which === 32) {
                        return false;
                }
        });

        $('#sign_up_form').on('submit', sign_up_proc);
        $('#sign_in_form').on('submit', sign_in_proc);
        $('#forgot_password_form').on('submit', forgot_password_proc);

})


</script>

<style>
.shrink-item {
        padding-top: 0.4rem;
        padding-bottom: 0.4rem;
        font-size: 0.95rem;  /* 필요 시 추가 조정 */
}

.plus-unread-dot{
    position:absolute;
    top:2px;
    right:2px;
    width:8px;
    height:8px;
    background: var(--bs-primary);
    border-radius:50%;
}

.has-unread {
        position: relative;
        display: inline-block; /* 텍스트 정렬을 위해 유지 */
}

.unread-dot {
        position: absolute;
        top: -4px;         /* 위쪽으로 올리기 */
        left: -7px;        /* 텍스트 왼쪽으로 이동 */
        width: 5px;        /* 원래 10px → 5px (50%) */
        height: 5px;
        background-color: red;
        border-radius: 50%;
        display: inline-block;
        box-shadow: 0 0 0 1px white;
}


.green-dot {
        position: absolute;
        top: -4px;         /* 위쪽으로 올리기 */
        left: -7px;        /* 텍스트 왼쪽으로 이동 */
        width: 5px;        /* 원래 10px → 5px (50%) */
        height: 5px;
        background-color: var(--bs-success);
        border-radius: 50%;
        display: inline-block;
        box-shadow: 0 0 0 1px white;
}


.dark-dot {
        position: absolute;
        top: -4px;         /* 위쪽으로 올리기 */
        left: -7px;        /* 텍스트 왼쪽으로 이동 */
        width: 5px;        /* 원래 10px → 5px (50%) */
        height: 5px;
        background-color: #212529 ;
        border-radius: 50%;
        display: inline-block;
        box-shadow: 0 0 0 1px white;
}


.social-share-list .list-group-item{
    padding-left:10px;
}

.share-icon{
    width:32px;
    height:32px;
    border-radius:50%;
    border:1px solid #dee2e6;
    display:flex;
    align-items:center;
    justify-content:center;
    color:#6c757d;
}
</style>

<!-- 오프캔버스 메뉴 -->
<div class="offcanvas offcanvas-end" tabindex="-1" id="offcanvasRight" aria-labelledby="offcanvasRightLabel">
        <div class="offcanvas-header">
                <h5 class="offcanvas-title" id="offcanvasRightLabel">
                        <span style='margin-left:13px'>
                                <a href='https://cc.cc' target='_blank'>
                                        <svg width="16" height="16" viewBox="0 0 512 512"
                                                xmlns="http://www.w3.org/2000/svg"
                                                fill="#74788d" stroke="#74788d" stroke-width="2"
                                                stroke-linecap="round" stroke-linejoin="round">
                                                <path d="M405.333 469.333H320C314.343 469.333 308.917 467.085 304.916 463.084C300.915 459.084 298.668 453.658 298.667 448V320H213.333V448C213.333 453.658 211.085 459.084 207.085 463.084C203.084 467.085 197.658 469.333 192 469.333H106.667C89.6995 469.314 73.4321 462.565 61.4339 450.566C49.4358 438.568 42.6867 422.301 42.6674 405.333V233.247C42.6262 220.245 45.5759 207.407 51.2886 195.727C57.0012 184.047 65.3237 173.838 75.6124 165.888L216.712 56.1479C227.943 47.4037 241.77 42.6558 256.004 42.6558C270.238 42.6558 284.064 47.4037 295.295 56.1479L436.395 165.893C446.684 173.842 455.007 184.051 460.72 195.731C466.432 207.411 469.382 220.248 469.34 233.25V405.333C469.321 422.302 462.571 438.571 450.571 450.569C438.572 462.567 422.303 469.315 405.333 469.333ZM341.333 426.666H405.333C410.989 426.659 416.412 424.41 420.411 420.41C424.41 416.411 426.66 410.989 426.666 405.333V233.247C426.688 226.747 425.214 220.329 422.359 214.489C419.504 208.649 415.344 203.545 410.2 199.57L269.1 89.8259C265.356 86.9102 260.746 85.327 256 85.327C251.255 85.327 246.645 86.9102 242.9 89.8259L101.8 199.568C96.6561 203.542 92.495 208.647 89.6389 214.486C86.7828 220.326 85.3083 226.744 85.3294 233.245V405.333C85.336 410.989 87.5857 416.411 91.585 420.41C95.5843 424.41 101.007 426.659 106.662 426.666H170.662V320C170.675 308.688 175.175 297.843 183.174 289.844C191.172 281.845 202.017 277.346 213.329 277.333H298.662C309.975 277.345 320.821 281.844 328.821 289.843C336.82 297.842 341.32 308.687 341.333 320V426.666Z"/>
                                        </svg>
                                        <b style='color:#74788d;font-size:17px;margin-left:2px'>cc.cc</b>
                                </a>
                        </span>
                </h5>
                <button type="button" class="btn-close" data-bs-dismiss="offcanvas" aria-label="Close" id='menu_slider'></button>
        </div>

        <div class="offcanvas-body" style="max-height: 80vh; overflow-y: auto; padding-bottom: 4rem;">
                <ul class="list-group">
                        <li class="list-group-item list-group-item-action text-primary fw-bold shrink-item"
                                onClick="location='https://cc.cc'">
                                <span class='has-unread'>
                                        Claim your cc.cc                                        <span class="unread-dot"></span>
                                </span>
                        </li>
                        <li class="list-group-item list-group-item-action text-primary fw-bold shrink-item bg-light"
                                onClick="location='https://cc.cc'">
                                <div class='text-muted fw-normal'>Free signup in 4 seconds</div>
                        </li>
                </ul>


                <ul class="mt-3 list-group social-share-list" id='third_party_mobile'>
                        <li class="list-group-item list-group-item-action shrink-item share-item" onClick="shareContact()">
                                <div class="d-flex align-items-center">
                                        <div class="share-icon text-secondary">
                                                <svg xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round" class="lucide lucide-share2-icon lucide-share-2"><circle cx="18" cy="5" r="3"/><circle cx="6" cy="12" r="3"/><circle cx="18" cy="19" r="3"/><line x1="8.59" x2="15.42" y1="13.51" y2="17.49"/><line x1="15.41" x2="8.59" y1="6.51" y2="10.49"/></svg>
                                        </div>
                                        <div class="ms-2 fw-semibold">
                                                Share This Page                                        </div>
                                </div>
                        </li>
                </ul>

                <ul class="list-group mt-3 social-share-list" id='third_party_pc'>

                        <li class="list-group-item list-group-item-action shrink-item share-item" data-platform="facebook">
                                <div class="d-flex align-items-center">
                                        <div class="share-icon text-secondary">
                                                <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="18px" height="18px" fill="#0866ff" style="vertical-align: top;"><path d="M9.101 23.691v-7.98H6.627v-3.667h2.474v-1.58c0-4.085 1.848-5.978 5.858-5.978.401 0 .955.042 1.468.103a8.68 8.68 0 0 1 1.141.195v3.325a8.623 8.623 0 0 0-.653-.036 26.805 26.805 0 0 0-.733-.009c-.707 0-1.259.096-1.675.309a1.686 1.686 0 0 0-.679.622c-.258.42-.374.995-.374 1.752v1.297h3.919l-.386 2.103-.287 1.564h-3.246v8.245C19.396 23.238 24 18.179 24 12.044c0-6.627-5.373-12-12-12s-12 5.373-12 12c0 5.628 3.874 10.35 9.101 11.647Z"/></svg>                                        </div>
                                        <div class="ms-2 fw-semibold">
                                                Share on Facebook                                        </div>
                                </div>
                        </li>

                        <li class="list-group-item list-group-item-action shrink-item share-item" data-platform="x">
                                <div class="d-flex align-items-center">
                                        <div class="share-icon text-secondary">
                                                <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="14px" height="14px" fill="#000000" style="vertical-align: top;"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg>                                        </div>
                                        <div class="ms-2 fw-semibold">
                                                Share on X                                        </div>
                                </div>
                        </li>
                </ul>

                <ul class="list-group mt-3 social-share-list" id='third_party_twitter'>
                        <li class="list-group-item list-group-item-action shrink-item share-item" data-platform="x">
                                <div class="d-flex align-items-center">
                                        <div class="share-icon text-secondary">
                                                <svg role="img" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg" width="14px" height="14px" fill="#000000" style="vertical-align: top;"><path d="M18.901 1.153h3.68l-8.04 9.19L24 22.846h-7.406l-5.8-7.584-6.638 7.584H.474l8.6-9.83L0 1.154h7.594l5.243 6.932ZM17.61 20.644h2.039L6.486 3.24H4.298Z"/></svg>                                        </div>
                                        <div class="ms-2 fw-semibold">
                                                Share on X                                        </div>
                                </div>
                        </li>
                </ul>
                                <ul class="list-group mt-3 social-share-list">
                                        <li class="list-group-item list-group-item-action shrink-item share-item" onClick="openPayPalAmountSelect('','USD')">
                                                <div class="d-flex align-items-center">
                                                        <div class="share-icon text-secondary flex-shrink-0">
                                                                <svg 
                                                                        xmlns="http://www.w3.org/2000/svg" 
                                                                        width="16" 
                                                                        height="16" 
                                                                        viewBox="0 0 24 24" 
                                                                        fill="none" 
                                                                        stroke="currentColor" 
                                                                        stroke-width="2" 
                                                                        stroke-linecap="round" 
                                                                        stroke-linejoin="round" 
                                                                        class="lucide lucide-gift"
                                                                >
                                                                        <path d="M12 7v14"/>
                                                                        <path d="M20 11v8a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2v-8"/>
                                                                        <path d="M7.5 7a1 1 0 0 1 0-5A4.8 8 0 0 1 12 7a4.8 8 0 0 1 4.5-5 1 1 0 0 1 0 5"/>
                                                                        <rect x="3" y="7" width="18" height="4" rx="1"/>
                                                                </svg>
                                                        </div>
                                                        <div class="ms-2 fw-semibold">
                                                                Send money to Fajrin Indah                                                        </div>
                                                </div>
                                        </li>
                                </ul>


<style>
.offcanvas-footer{
    position:absolute;
    bottom:10px;
    left:0;
    width:100%;
    background:#fff;
    z-index:999;
}

.footer-bar{
    border-top:1px solid var(--bs-border-color);
}

.lt-footer{
    font-size:11px;
    color:var(--bs-dark);
    padding:0 10px;   /* 상하 0, 좌우 5px */
}

.lt-footer a{
    color:var(--bs-dark);
    text-decoration:none;
    margin:0 2px;
}

.lt-footer span{
    margin:0 1px;
}

.lt-footer a:hover{
    text-decoration:underline;
}
</style>

<!-- footer -->
<div class="offcanvas-footer footer-bar">
        <div class="lt-footer text-center py-2 px-2">
                <a href="https://cc.cc/cookie_policy/cookie_policy.php" target='_blank'>
                        Cookie Policy                </a>
                <span>•</span>
                <a href="javascript:void(0)" onclick="$('#reportThisLinkModal').modal('show');">
                        Report this link                </a>
                <span>•</span>
                <a href="https://cc.cc/privacy_policy/privacy_policy.php" target="_blank">
                        Privacy Policy                </a>
                <span>•</span>
                <a href="javascript:void(0)" onclick='openExplorePopup()'>
                        Explore other profiles                </a>
        </div>
</div>


</div>

<script>

 if (check_mobile())
 {
 }
 else
 {
        $('#qr_code_menu').show();
 }

function view_tooltip(title,pos)
{
        let bookmark_tooltip = $('#bookmark_' + pos + '_tooltip');

        // 툴팁 텍스트 변경 (필요하면)
        bookmark_tooltip.text(title);

        // 툴팁 보여주기
        bookmark_tooltip.fadeIn(200);

        // 2초 후 툴팁 숨기기
        setTimeout(() => {
        bookmark_tooltip.fadeOut(200);
        }, 2000);
}

function disp_bookmark(bookmarked,auto,pos)
{
//        console.log('disp_bookmark',bookmarked,auto,pos);
        if (bookmarked == '1')
        {
//                console.log('bookmarked yes');
                $('#bookmark_yes').show();
                $('#bookmark_no').hide();

                if (auto == '1')
                {
                        view_tooltip('Added to Favorites',pos);
                }
        }
        else
        {
//                console.log('bookmarked no');
                $('#bookmark_yes').hide();
                $('#bookmark_no').show();

                if (auto == '1')
                {
                        view_tooltip('Removed from Favorites',pos);
                }
        }

        if ($('#bookmark_yes').is(':visible')) {
                $('#powered-favorites')
                .removeClass()
                .addClass('badge rounded-pill bg-white text-primary border border-primary');

                $('#favorites_title').html('Favorited');

        } else {
                $('#powered-favorites')
                .removeClass()
                .addClass('badge rounded-pill bg-primary');

                $('#favorites_title').html('Add to Favorites');
        }
}



function get_bookmarked_check()
{
//        console.log("get_bookmarked_check 실행 시각:", performance.now(), "스택:", new Error().stack);

        var params = 'short_code_val=aUljVHk0cS9wTGw5SXVPeFliUUIzSWR1eUpzZVM0U1ZPUTlReDl1QUVKOD0&r=' + Math.random();
        $.ajax({
                type: 'GET',
                url: 'https://cc.cc/bookmark/get_bookmark_check_proc_ajax.php',
                data: params,
                xhrFields: {
                        withCredentials: true
                },
                success: function(res) {
//                console.log(res);

                res_json = $.parseJSON(res);

                disp_bookmark(res_json.bookmarked,0,'');

            }
        });
}

function getCookie(name) {
        const match = document.cookie.match(new RegExp('(^| )' + name + '=([^;]+)'));
        if (match) return match[2];
        return null;
}

function getUrlType() {
    const hostname = window.location.hostname; // ex) cc.cc or aaa.cc.cc
    const pathname = window.location.pathname; // ex) /aaa or /

    if (pathname !== "/" && pathname !== "") {
        return "d"; // 도메인 뒤 경로가 있는 경우
    }

    const subdomain = hostname.split('.').length > 2;
    if (subdomain) {
        return "s"; // 서브도메인이 있는 경우
    }

    return ""; // 해당되지 않는 경우
}


function view_bookmarks()
{
        const sgn = getCookie('_sgn_');

        if (sgn)
        {
                location='https://cc.cc/bookmark/bookmarks.php';
        }
        else
        {
                alert('Log in to save and view your favorites');
        }
}

function toggle_bookmark(pos)
{
        if ($('#bookmark_yes').is(':visible')) {
                put_bookmark(0,pos);
        } else {
                put_bookmark(1,pos);
        }
}

function put_bookmark(force,pos)
{
//        console.log('put_bookmark',force,pos);

        const sgn = getCookie('_sgn_');

        if (!sgn)
        {
                view_tooltip('Log in to save and view your favorites',pos);
                return false;
        }

        var params = 'short_code_val=aUljVHk0cS9wTGw5SXVPeFliUUIzSWR1eUpzZVM0U1ZPUTlReDl1QUVKOD0&force=' + force + '&r=' + Math.random();

//        console.log('params',params);

        $.ajax({
                type: 'GET',
                url: 'https://cc.cc/bookmark/bookmark_proc_ajax.php',
                data: params,
                xhrFields: {
                        withCredentials: true
                },
                success: function(res) {
//                console.log(res);

                res_json = $.parseJSON(res);

                if (res_json.bookmarked == 'o')
                {
                        location = 'https://cc.cc/bookmarks';
                        return false;
                }

                disp_bookmark(res_json.bookmarked,1,pos);

            }
        });
}

function check_mobile() {
//        console.log(navigator.userAgent);
//        alert(navigator.userAgent);

        return /Mobi|Android|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i
                .test(navigator.userAgent);
}

(function($) {
    $.base64Decode = function(str) {
        try {
            return decodeURIComponent(escape(atob(str)));
        } catch (e) {
            console.error("Base64 Decode Error:", e);
            return null;
        }
    };
})(jQuery);

$(document).ready(function() {
    // 1. 처음에는 second를 숨기고 first만 보이게 설정
    $('#short_code_second').hide();

    // 2. 2초(2000ms)마다 번갈아가며 토글하는 함수 정의
    function toggleShortCode() {
        // 현재 first가 보이고 있다면
        if ($('#short_code_first').is(':visible')) {
            // first는 사라지고 second는 나타남
            $('#short_code_first').fadeOut(400, function() {
                $('#short_code_second').fadeIn(400);
            });
        } else {
            // second는 사라지고 first는 나타남
            $('#short_code_second').fadeOut(400, function() {
                $('#short_code_first').fadeIn(400);
            });
        }
    }

    // 3. 3초 간격으로 인터벌 실행
    setInterval(toggleShortCode, 3000);
    
    // 부트스트랩 툴팁 초기화 (페이지 로드시 필수)
    var tooltipTriggerList = [].slice.call(document.querySelectorAll('[data-bs-toggle="tooltip"]'))
    var tooltipList = tooltipTriggerList.map(function (tooltipTriggerEl) {
        return new bootstrap.Tooltip(tooltipTriggerEl)
    });

    // 공통 툴팁 노출 함수 (1.5초 후 자동으로 닫힘)
    function showCopyTooltip(elementId) {
        var el = document.getElementById(elementId);
        var tooltip = bootstrap.Tooltip.getInstance(el);
        
        tooltip.show();
        
        setTimeout(function() {
            tooltip.hide();
        }, 1500); // 1.5초 뒤 마우스 아웃 처리처럼 숨김
    }

    // 1. 링크 복사 버튼 클릭
    $('#popup-copy-link').on('click', function() {
        var linkText = 'https://fajrin.cc.cc';
        
        navigator.clipboard.writeText(linkText).then(function() {
            showCopyTooltip('popup-copy-link'); // 성공 시 툴팁 표시
        }).catch(function(error) {
            console.error('복사 실패:', error);
        });
    });

    // 2. 이메일 복사 버튼 클릭
    $('#popup-copy-email').on('click', function() {
        var emailText = 'fajrin@cc.cc';
        
        navigator.clipboard.writeText(emailText).then(function() {
            showCopyTooltip('popup-copy-email'); // 성공 시 툴팁 표시
        }).catch(function(error) {
            console.error('복사 실패:', error);
        });
    });


    $('#not-allowed-phone').on('click', function() {
            showCopyTooltip('not-allowed-phone');
    });

        $('#qr_code_phone_no').html($.base64Decode(''));
        $('#qr_code_viber').html($.base64Decode(''));
        $('#qr_code_qq').html($.base64Decode(''));

        $('#qr_code_email').attr('href', 'mailto:'+$.base64Decode('ZmFqcmluQGNjLmNj'));
        $('#qr_code_email_view').html($.base64Decode('ZmFqcmluQGNjLmNj'));


        $('#call_phone_no').on('click', function (e) {
                // 모바일에서 바로 전화 걸게 하려면 href를 클릭 전에 미리 세팅해두거나, preventDefault()를 빼야 합니다.
//            console.log('click call_phone_no');
            if (check_mobile()) {
                var phone = $.base64Decode('');
                $(this).attr('href', 'tel:' + phone);
                click_call('c');
//                console.log('mobile');
            } else {
                e.preventDefault(); // PC일 때만 기본 동작 방지
                open_not_call('0c');
//                console.log('PC');
            }
        });

        $('#click_viber').on('click', function (e) {
                e.preventDefault(); // a태그 기본 동작 방지
                if (check_mobile()) {
                       open_viber($.base64Decode(''));
                } else {
                        open_not_viber();
                }
        });


        $('#click_qq').on('click', function (e) {
                e.preventDefault(); // a태그 기본 동작 방지
                if (check_mobile()) {
                       open_qq($.base64Decode(''));
                } else {
                        open_not_qq();
                }
        });
});


window.onload = function() {
//    get_bookmarked_check();  // 주석 해제 시 자동 실행

};

</script>
<!--2026-09-12 00:18:18-->


<script>

function share_proc(platform)
{
        var url = '';

        var shareUrl = 'https://fajrin.cc.cc/post/4102772633';
        var hashtag = 'fajrin';   // # 제외

        platform = String(platform).toLowerCase();

        if (platform == "x") {
                url = "https://x.com/intent/tweet"
                    + "?url=" + encodeURIComponent("fajrin.cc.cc")
                    + "&text=" + encodeURIComponent("Check out my cc․cc");
        }


        if (platform == "facebook") {
                url = "https://www.facebook.com/sharer/sharer.php"
                    + "?u=" + encodeURIComponent(shareUrl);
        }

        if(platform == "whatsapp"){
                url = "https://wa.me/?text=" + shareUrl;
        }

        if(url){
                window.open(url, "_blank");
        }
}


(function () {
    const qrImgUrl = "https://short-img3.cc.cc/2026/202609/20260904/1788455545583.png";
    const qrText   = "https://fajrin.cc.cc";
    const $targets = $('#phone_no_qrcode, #viber_qrcode, #qq_qrcode');

    const img = new Image();

    img.onload = function () {
        // ✅ QR 이미지가 존재하는 경우
        $targets.html(
            "<img src='" + qrImgUrl + "' width='150' alt='QR Code'>"
        );
    };

    img.onerror = function () {
        // ❌ QR 이미지가 없는 경우 → script로 생성
        $targets.qrcode({
            width: 150,
            height: 150,
            correctLevel: 1,      // Level L
            text: qrText,
            foreground: "#3d454e", // ✅ QR 색상
            background: "#ffffff"  // (선택) 배경색
        });
    };

    img.src = qrImgUrl;
})();

$(function() {
    function getYoutubeInfo(url) {
        if (!url) return null;
        url = url.trim();

        let videoId = null;
        let isShorts = false;

        // 1. Shorts URL 판별 (-LvflLt3SK0 패턴)
        if (url.includes('/shorts/')) {
            videoId = url.split('/shorts/')[1].split(/[?&]/)[0];
            isShorts = true;
        } 
        // 2. 일반 및 기타 URL 판별 (watch?v= 패턴 등)
        else {
            const regExp = /^.*((youtu.be\/)|(v\/)|(\/u\/\w\/)|(embed\/)|(watch\?))\??v?=?([^#&?]*).*/;
            const match = url.match(regExp);
            if (match && match[7].length === 11) {
                videoId = match[7];
            }
        }

        return videoId ? { id: videoId, isShorts: isShorts } : null;
    }

    // 모든 .yt-lazy-item 요소를 순회하며 초기화
    $('.yt-lazy-item').each(function() {
        const $container = $(this);
        const url = $container.attr('data-video-url');
        const videoInfo = getYoutubeInfo(url);

        if (!videoInfo) {
            $container.hide(); // URL이 유효하지 않으면 숨김
            return;
        }

        // 비율에 따른 클래스 부여 (CSS와 연동)
        if (videoInfo.isShorts) {
            $container.addClass('is-shorts').removeClass('is-standard');
        } else {
            $container.addClass('is-standard').removeClass('is-shorts');
        }

        // 썸네일 표시 (고화질 hqdefault)
        const thumb = `https://img.youtube.com/vi/${videoInfo.id}/hqdefault.jpg`;
        $container.html(`
            <img src="${thumb}" alt="Thumbnail">
            <div class="yt-play"><span></span></div>
        `);

        // 클릭 이벤트: Iframe 교체
        $container.one('click', function() {
            const iframeSrc = `https://www.youtube-nocookie.com/embed/${videoInfo.id}?autoplay=1&rel=0`;
            $(this).html(`
                <iframe src="${iframeSrc}" frameborder="0" allowfullscreen allow="autoplay" 
                        style="width:100%; height:100%; border:0;"></iframe>
            `);
        });
    });
});


$(function () {
    if ($('.facebook-messenger').length) {

        // iPhone(iOS) 여부 확인
        var isIPhone = /iPhone/i.test(navigator.userAgent);

        if (isIPhone) {
            $('.facebook-messenger a').each(function () {
                var href = $(this).attr('href');

                if (href && href.indexOf('https://m.me/') === 0) {
                    $(this).attr('href', href.replace('https://m.me/', 'https://facebook.com/'));
                }
            });
        }

    }
});


$(document).on("click",".share-item",function(){

    var platform = $(this).data("platform");

    var shareUrl = encodeURIComponent(window.location.href);

    var url = "";

    if(platform == "x"){
        url = "https://x.com/intent/tweet?url=" + shareUrl;
    }

    if(platform == "facebook"){
        url = "https://www.facebook.com/sharer/sharer.php?u=" + shareUrl;
    }

    if(platform == "whatsapp"){
        url = "https://wa.me/?text=" + shareUrl;
    }

    if(url){
        window.open(url, "_blank");
    }

});
</script>




