/* 명함 카드 기본 스타일 - 확대 및 여백 최소화 */
.business-card {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    font-family: var(--font-family, 'Noto Sans KR', sans-serif);
}

.card-modern {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-modern .card-header {
    padding: 20px 15px 15px;
    text-align: center;
    min-height: 120px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* 프로필 이미지 원형 및 중앙 정렬 - 확대 */
.profile-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* 정사각 래퍼 + 내부 img 100% 로 비율 왜곡 방지 (원형 마스크는 overflow 로 처리) */
.card-modern .profile-image-wrapper {
    width: 120px;
    height: 120px;
    min-width: 120px;
    min-height: 120px;
    margin: 0 auto;
    flex-shrink: 0;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-modern .profile-image {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin: 0;
    display: block;
    object-fit: cover;
    object-position: center center;
    -webkit-object-fit: cover;
}

.card-modern .card-body {
    padding: 15px 20px 20px;
}

/* 이름 섹션 - 이름/직책/회사명과 로고를 나란히 배치 - 여백 최소화 */
.name-section {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 15px;
}

.name-info {
    flex: 1;
}

.name-section .name {
    margin: 0 0 5px 0;
    font-size: 38px;
    font-weight: 700;
    color: #1f2937;
    line-height: 1.2;
}

.name-section .job-title {
    margin: 0 0 3px 0;
    font-size: 22px;
    color: #6b7280;
    font-weight: 500;
    line-height: 1.3;
}

.name-section .company {
    margin: 0;
    font-size: 19px;
    color: #9ca3af;
    line-height: 1.3;
}

/* 회사 로고 - 이름 섹션 오른쪽에 배치 */
.company-logo-side {
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    background: #f9fafb;
    border-radius: 6px;
    min-width: 140px;
    height: fit-content;
}

.company-logo-side .company-logo {
    max-width: 140px;
    max-height: 70px;
    object-fit: contain;
}

/* 연락처 정보 여백 최소화 */
.contact-info {
    margin-top: 15px;
    font-size: 10px;
}

.contact-item {
    margin-bottom: 8px;
    font-size: 17px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.contact-item:last-child {
    margin-bottom: 0;
}

/* 소셜 링크 여백 최소화 */
.social-links {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #e5e7eb;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.social-icon {
    display: inline-block;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    overflow: hidden;
    background-color: #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease;
}

.social-icon:hover {
    transform: translateY(-2px);
}

.social-icon img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* 모든 템플릿 스타일의 텍스트 크기 확대 (1.5배) */
.business-card .name {
    font-size: 1.5em !important;
}

.business-card .job-title {
    font-size: 1.5em !important;
}

.business-card .company {
    font-size: 1.5em !important;
}

.business-card .contact-item {
    font-size: 1.5em !important;
}

/* 클래식 스타일 - 프로필 이미지 원형 및 중앙 정렬 */
.card-classic {
    display: flex;
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-classic .card-left {
    width: 200px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100%;
}

.card-classic .card-left .profile-image-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 120px;
    height: 120px;
    min-width: 120px;
    min-height: 120px;
    margin: 0 auto 15px;
    border-radius: 50%;
    overflow: hidden;
    border: 4px solid white;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.card-classic .card-left .profile-image {
    width: 100%;
    height: 100%;
    border-radius: 0;
    border: none;
    box-shadow: none;
    margin: 0;
    display: block;
    object-fit: cover;
    object-position: center center;
    -webkit-object-fit: cover;
}

.card-classic .card-right {
    flex: 1;
    padding: 30px;
}

/* 클래식, 미니멀, 크리에이티브 스타일 텍스트 크기 (80% 축소) */
.card-classic .name,
.card-minimal .name,
.card-creative .name {
    font-size: 1.2em !important;
}

.card-classic .job-title,
.card-minimal .job-title,
.card-creative .job-title {
    font-size: 1.2em !important;
}

.card-classic .company,
.card-minimal .company,
.card-creative .company {
    font-size: 1.2em !important;
}

.card-classic .contact-item,
.card-minimal .contact-item,
.card-creative .contact-item {
    font-size: 1.2em !important;
}

/* 회사 로고 스타일 */
.company-logo-container {
    text-align: center;
    margin-bottom: 15px;
    padding: 10px;
    background: #f9fafb;
    border-radius: 8px;
}

.company-logo {
    max-width: 140px;
    max-height: 70px;
    object-fit: contain;
}

/* 클래식 스타일 로고 */
.company-logo-container-top {
    text-align: right;
    margin-bottom: 15px;
}

.company-logo-small {
    max-width: 120px;
    max-height: 50px;
    object-fit: contain;
}

/* 미니멀 스타일 */
.card-minimal {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.card-minimal .card-content {
    padding: 20px;
}

.minimal-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e5e7eb;
}

.minimal-header .profile-image-small {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    object-fit: cover;
    object-position: center center;
    -webkit-object-fit: cover;
    border: 3px solid var(--primary-color);
}

.minimal-title {
    flex: 1;
}

.minimal-title .name {
    font-size: 36px;
    margin-bottom: 5px;
    color: var(--primary-color);
}

.minimal-title .job-title {
    font-size: 24px;
    color: #6b7280;
}

.company-logo-minimal {
    max-width: 120px;
    max-height: 60px;
    object-fit: contain;
    margin-left: auto;
}

/* 크리에이티브 스타일 */
.card-creative {
    position: relative;
    min-height: 450px;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.creative-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 180px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 20px;
}

.company-logo-creative {
    max-width: 140px;
    max-height: 70px;
    object-fit: contain;
    filter: brightness(0) invert(1);
}

.creative-content {
    position: relative;
    padding: 140px 20px 20px;
    text-align: center;
}

.profile-image-creative {
    width: 140px;
    height: 140px;
    border-radius: 50%;
    border: 5px solid white;
    object-fit: cover;
    object-position: center center;
    -webkit-object-fit: cover;
    margin: 0 auto 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.card-creative .name {
    font-size: 39px;
    margin-bottom: 8px;
    color: var(--primary-color);
}

.card-creative .job-title {
    font-size: 24px;
    color: #6b7280;
    margin-bottom: 5px;
}

.card-creative .company {
    font-size: 21px;
    color: #9ca3af;
    margin-bottom: 25px;
}

.card-creative .contact-info {
    text-align: left;
    max-width: 400px;
    margin: 0 auto;
}

/* 모바일 반응형 */
@media (max-width: 768px) {
    .business-card {
        max-width: 100%;
        width: 100%;
    }

    .card-modern {
        border-radius: 12px;
    }

    .card-modern .profile-image-wrapper {
        width: 120px !important;
        height: 120px !important;
        min-width: 120px !important;
        min-height: 120px !important;
        border-width: 3px !important;
    }

    .card-modern .profile-image {
        width: 100% !important;
        height: 100% !important;
        border: none !important;
        box-shadow: none !important;
    }

    .card-modern .card-header {
        padding: 15px 10px 12px !important;
        min-height: 90px !important;
    }

    .name-section {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 10px;
        margin-bottom: 12px;
    }

    .company-logo-side {
        width: 100%;
        min-width: auto;
        padding: 6px;
    }

    .company-logo-side .company-logo {
        max-width: 120px !important;
        max-height: 60px !important;
    }

    .name-section .name {
        font-size: 29px !important;
        margin-bottom: 4px !important;
    }

    .name-section .job-title {
        font-size: 19px !important;
        margin-bottom: 2px !important;
    }

    .name-section .company {
        font-size: 17px !important;
    }

    .card-modern .card-body {
        padding: 12px 15px 15px !important;
    }

    .contact-info {
        margin-top: 12px;
    }

    .contact-item {
        margin-bottom: 6px;
        font-size: 16px;
    }

    .social-links {
        margin-top: 12px;
        padding-top: 12px;
    }

    /* 클래식 스타일 모바일 */
    .card-classic {
        flex-direction: column;
    }

    .card-classic .card-left {
        width: 100%;
        padding: 15px;
    }

    .card-classic .card-left .profile-image-wrapper {
        width: 140px !important;
        height: 140px !important;
        min-width: 140px !important;
        min-height: 140px !important;
        border-width: 3px !important;
    }

    .card-classic .card-left .profile-image {
        width: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
        border: none !important;
        box-shadow: none !important;
        object-fit: cover !important;
        object-position: center center !important;
    }

    .card-classic .card-right {
        padding: 15px !important;
    }

    /* 다른 템플릿 스타일 모바일 최적화 */
    .card-classic .name { font-size: 36px !important; }
    .card-classic .job-title { font-size: 24px !important; }
    .card-classic .company { font-size: 21px !important; }
    .card-classic .contact-item { font-size: 20px !important; }

    .minimal-header .profile-image-small {
        width: 80px !important;
        height: 80px !important;
    }
    .minimal-title .name { font-size: 36px !important; }
    .minimal-title .job-title { font-size: 24px !important; }
    .company-logo-minimal {
        max-width: 100px !important;
        max-height: 50px !important;
    }
    .card-minimal .contact-item { font-size: 20px !important; }

    .profile-image-creative {
        width: 110px !important;
        height: 110px !important;
    }
    .card-creative .name { font-size: 36px !important; }
    .card-creative .job-title { font-size: 24px !important; }
    .card-creative .company { font-size: 21px !important; }
    .company-logo-creative {
        max-width: 120px !important;
        max-height: 60px !important;
    }
    .card-creative .contact-item { font-size: 20px !important; }
}

/* 작은 모바일 화면 (480px 이하) */
@media (max-width: 480px) {
    .card-modern .profile-image-wrapper {
        width: 120px !important;
        height: 120px !important;
        min-width: 120px !important;
        min-height: 120px !important;
    }

    .card-modern .profile-image {
        width: 100% !important;
        height: 100% !important;
    }

    .card-modern .card-header {
        padding: 12px 8px 10px !important;
        min-height: 80px !important;
    }

    .name-section .name {
        font-size: 26px !important;
    }

    .name-section .job-title {
        font-size: 18px !important;
    }

    .name-section .company {
        font-size: 16px !important;
    }

    .card-modern .card-body {
        padding: 10px 12px 12px !important;
    }

    .contact-item {
        font-size: 14px;
    }

    /* 클래식 스타일 작은 모바일 */
    .card-classic .card-left .profile-image-wrapper {
        width: 120px !important;
        height: 120px !important;
        min-width: 120px !important;
        min-height: 120px !important;
    }

    .card-classic .card-left .profile-image {
        width: 100% !important;
        height: 100% !important;
        border-radius: 0 !important;
        object-fit: cover !important;
        object-position: center center !important;
    }

    .card-classic .card-left {
        padding: 12px;
    }

    .card-classic .card-right {
        padding: 12px !important;
    }

    /* 다른 템플릿 스타일 작은 모바일 최적화 */
    .card-classic .name { font-size: 33px !important; }
    .card-classic .job-title { font-size: 23px !important; }
    .card-classic .company { font-size: 20px !important; }
    .card-classic .contact-item { font-size: 18px !important; }

    .minimal-header .profile-image-small {
        width: 70px !important;
        height: 70px !important;
    }
    .minimal-title .name { font-size: 33px !important; }
    .minimal-title .job-title { font-size: 23px !important; }
    .company-logo-minimal {
        max-width: 90px !important;
        max-height: 45px !important;
    }
    .card-minimal .contact-item { font-size: 18px !important; }

    .profile-image-creative {
        width: 100px !important;
        height: 100px !important;
    }
    .card-creative .name { font-size: 33px !important; }
    .card-creative .job-title { font-size: 23px !important; }
    .card-creative .company { font-size: 20px !important; }
    .company-logo-creative {
        max-width: 100px !important;
        max-height: 50px !important;
    }
    .card-creative .contact-item { font-size: 18px !important; }
}

/* 로고가 있을 때 명함 레이아웃 조정 */
.card-modern .card-body:has(.company-logo-container) .name {
    margin-top: 10px;
}

/* 로고 배치 옵션 추가 스타일 */
.logo-position-option {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    margin-top: 15px;
}

.logo-position-option label {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    border: 2px solid #e5e7eb;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
}

.logo-position-option label:hover {
    border-color: #2563eb;
    background: #eff6ff;
}

.logo-position-option input[type="radio"] {
    margin-right: 8px;
}

.logo-position-option input[type="radio"]:checked + span {
    color: #2563eb;
    font-weight: 600;
}

/* ============================================
   명함 편집 페이지 스타일 (edit_card.php)
   ============================================ */
.edit-card-page {
    font-family: 'Arial', sans-serif;
    background-color: #f5f5f5;
    margin: 0;
    padding: 60px 10px 70px 10px;
}

.edit-card-page .container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    padding: 10px;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.edit-card-page h1 {
    color: #333;
    margin-bottom: 30px;
}

.edit-card-page .alert {
    padding: 15px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.edit-card-page .alert.error {
    background-color: #fee;
    color: #c33;
    border: 1px solid #fcc;
}

.edit-card-page .form-section {
    margin-bottom: 10px;
    padding-bottom: 10px;
    border-bottom: 1px solid #eee;
}

.edit-card-page .form-section:last-child {
    border-bottom: none;
}

.edit-card-page .form-section h2 {
    color: #555;
    font-size: 18px;
    margin-bottom: 20px;
}

.edit-card-page .form-group {
    margin-bottom: 20px;
}

.edit-card-page .form-group label {
    display: block;
    margin-bottom: 5px;
    color: #333;
    font-weight: 500;
}

.edit-card-page .form-group input[type="text"],
.edit-card-page .form-group input[type="email"],
.edit-card-page .form-group input[type="tel"],
.edit-card-page .form-group input[type="url"],
.edit-card-page .form-group textarea,
.edit-card-page .form-group select {
    width: 100%;
    padding: 5px 10px 5px 10px;;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    box-sizing: border-box;
}

.edit-card-page .form-group textarea {
    resize: vertical;
}

.edit-card-page .form-group input[type="file"] {
    padding: 5px;
}

.edit-card-page .current-image {
    display: block;
    max-width: 150px;
    max-height: 150px;
    width: auto;
    height: auto;
    margin-top: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    object-fit: contain;
    object-position: center center;
    -webkit-object-fit: contain;
}

.edit-card-page .logo-preview-container {
    margin-top: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.edit-card-page .logo-preview {
    max-width: 200px;
    max-height: 100px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    padding: 10px;
    background: #f9fafb;
}

.edit-card-page .logo-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.edit-card-page .logo-info {
    background: #eff6ff;
    padding: 12px;
    border-radius: 6px;
    margin-top: 10px;
    font-size: 13px;
    color: #1e40af;
}

.edit-card-page .logo-info ul {
    margin: 8px 0 0 20px;
}

.edit-card-page .logo-info li {
    margin: 4px 0;
}

.edit-card-page .btn-remove-logo {
    background: #ef4444;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.edit-card-page .btn-remove-logo:hover {
    background: #dc2626;
}

.edit-card-page .checkbox-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
}

.edit-card-page .checkbox-group input[type="checkbox"] {
    width: auto;
}

.edit-card-page .form-actions {
    margin: 10px;
    display: flex;
    gap: 10px;
    justify-content: space-around;
}

.edit-card-page .btn {
    padding: 7px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    width: 100px;
}

.edit-card-page .btn-primary {
    background-color: #2563eb;
    color: white;
}

.edit-card-page .btn-primary:hover {
    background-color: #1e40af;
}

.edit-card-page .btn-secondary {
    background-color: #6b7280;
    color: white;
}

.edit-card-page .btn-secondary:hover {
    background-color: #4b5563;
}

/* ============================================
   명함 미리보기 페이지 스타일 (preview_card.php)
   ============================================ */
.preview-page {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    /*background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);*/
    min-height: 100vh;
    padding: 0px 15px 20px 15px;
    margin: 0;
}

.preview-page .preview-container {
    max-width: 1200px;
    margin-top: 60px;
    margin-bottom: 70px;
}

.preview-page .preview-header {
    background: white;
    border-radius: 12px;
    padding: 25px 30px;
    margin-bottom: 10px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.preview-page .preview-header h1 {
    margin: 0;
    font-size: 28px;
    font-weight: 700;
    color: #1f2937;
}

.preview-page .action-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.preview-page .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    text-align: center;
    width: 130px;
    height: unset;
}

.preview-page .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.preview-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.preview-page .btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.preview-page .btn-secondary:hover {
    background: #e5e7eb;
}

.preview-page .card-preview-wrapper {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: auto;
}

.preview-page .card-preview-wrapper .business-card {
    max-width: 100%;
    width: 100%;
}

.preview-page .share-info {
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.preview-page .share-info h2 {
    margin: 0 0 20px 0;
    font-size: 22px;
    font-weight: 700;
    color: #1f2937;
}

.preview-page .share-url-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: nowrap;
    width: 100%;
}

.preview-page .share-url-box input {
    flex: 1;
    min-width: 0;
    padding: 12px 16px;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-size: 14px;
    background: #f9fafb;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    width: 100%;
    box-sizing: border-box;
}

.preview-page .share-url-box input:focus {
    outline: none;
    border-color: #667eea;
}

.preview-page .btn-copy {
    padding: 12px 20px;
    background: #667eea;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
    white-space: nowrap;
}

.preview-page .btn-copy:hover {
    background: #5568d3;
    transform: translateY(-2px);
}

.preview-page .view-count {
    margin: 15px 0;
    color: #6b7280;
    font-size: 14px;
}

.preview-page .qr-code {
    margin-top: 30px;
    padding-top: 30px;
    border-top: 2px solid #e5e7eb;
    text-align: center;
}

.preview-page .qr-code h3 {
    margin: 0 0 20px 0;
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
}

.preview-page .qr-code img {
    max-width: 100px;
    width: 100px;
    height: auto;
    border: 4px solid white;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    margin-bottom: 10px;
}

.preview-page .qr-code .hint {
    color: #6b7280;
    font-size: 13px;
    margin: 0;
}

/* 공유 팝업 스타일 */
.share-popup-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.share-popup-overlay.active {
    display: flex;
}

.share-popup-container {
    background: white;
    border-radius: 16px;
    padding: 30px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    position: relative;
    animation: popupFadeIn 0.3s ease;
}

@keyframes popupFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.share-popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
}

.share-popup-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 700;
    color: #1f2937;
}

.share-popup-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #9ca3af;
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.share-popup-close:hover {
    background: #f3f4f6;
    color: #374151;
}

.share-options {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

.share-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: #374151;
}

.share-option:hover {
    border-color: #667eea;
    background: #f9fafb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.15);
}

.share-option-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    font-size: 24px;
    overflow: hidden;
}

.share-option-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.share-option-kakao .share-option-icon {
    /*background: #FEE500;
    padding: 8px;*/
}

.share-option-telegram .share-option-icon {
    /*background: #0088cc;
    padding: 8px;*/
}

.share-option-sms .share-option-icon {
    background: #4CAF50;
    color: #fff;
}

.share-option-copy .share-option-icon {
    background: #667eea;
    color: #fff;
}

.share-option-name {
    font-size: 14px;
    font-weight: 600;
    text-align: center;
}

/* ============================================
   명함 공유 페이지 스타일 (share_card.php)
   ============================================ */
body.share-page {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    padding: 20px 2.5% 20px 2.5%;
    margin: 0;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    min-height: auto;
}

.share-page .share-container {
    max-width: 650px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
}

.share-page .card-wrapper {
    background: white;
    border-radius: 12px;
    padding: 8px;
    margin-bottom: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 100%;
}

.share-page .card-wrapper .business-card {
    width: 100%;
    max-width: 100%;
}

.share-page .action-section {
    background: white;
    border-radius: 12px;
    padding: 15px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

.share-page .btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.share-page .btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.share-page .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

.share-page .btn-secondary {
    background: #f3f4f6;
    color: #374151;
}

.share-page .btn-secondary:hover {
    background: #e5e7eb;
}

/* 미리보기 페이지 모바일 반응형 */
@media (max-width: 768px) {
    .preview-page {
        padding: 0px 15px 20px 15px;
    }

    .preview-page .preview-container {
        max-width: 100%;
        padding: 0 5px;
    }

    .preview-page .preview-header {
        padding: 15px;
        flex-direction: column;
        align-items: stretch;
        border-radius: 8px;
    }

    .preview-page .preview-header h1 {
        font-size: 20px;
        text-align: left;
        margin-bottom: 15px;
    }

    .preview-page .action-buttons {
        justify-content: center;
        gap: 8px;
    }

    .preview-page .btn {
        flex: 1;
        min-width: 100px;
        padding: 10px 16px;
        font-size: 13px;
    }

    .preview-page .card-preview-wrapper {
        padding: 15px 10px;
        border-radius: 12px;
    }

    .preview-page .card-preview-wrapper .business-card {
        transform: scale(1);
    }

    .preview-page .share-info {
        padding: 20px 15px;
        border-radius: 12px;
    }

    .preview-page .share-info h2 {
        font-size: 18px;
        margin-bottom: 15px;
    }

    .preview-page .share-url-box {
        flex-direction: row;
        gap: 8px;
        margin-bottom: 15px;
    }

    .preview-page .share-url-box input {
        width: 100%;
        font-size: 14px;
        padding: 10px 12px;
        min-width: 0;
    }

    .preview-page .btn-copy {
        padding: 10px 16px;
        font-size: 13px;
        flex-shrink: 0;
    }

    .preview-page .view-count {
        font-size: 13px;
        margin: 12px 0;
    }

    .preview-page .qr-code {
        margin-top: 20px;
        padding-top: 20px;
    }

    .preview-page .qr-code h3 {
        font-size: 16px;
        margin-bottom: 15px;
    }

    .preview-page .qr-code img {
        max-width: 90px;
        width: 90px;
    }

    .preview-page .qr-code .hint {
        font-size: 14px;
    }

    .share-popup-container {
        padding: 20px;
        max-width: 90%;
    }

    .share-popup-header h3 {
        font-size: 18px;
    }

    .share-options {
        gap: 12px;
    }

    .share-option {
        padding: 15px;
    }

    .share-option-icon {
        width: 40px;
        height: 40px;
        font-size: 20px;
    }

    .share-option-name {
        font-size: 13px;
    }

    .share-page {
        padding: 15px 2.5% 15px 2.5%;
        align-items: flex-start;
    }

    .share-page .share-container {
        max-width: 100%;
        padding: 0;
    }

    .share-page .card-wrapper {
        padding: 8px;
        border-radius: 10px;
        margin-bottom: 10px;
    }

    .share-page .action-section {
        padding: 12px;
        border-radius: 10px;
        gap: 8px;
    }

    .share-page .btn {
        flex: 1;
        min-width: 120px;
        padding: 10px 16px;
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .preview-page {
        padding: 0px 15px 20px 15px;
    }

    .preview-page .preview-container {
        padding: 0;
    }

    .preview-page .preview-header {
        padding: 12px;
    }

    .preview-page .preview-header h1 {
        font-size: 18px;
    }

    .preview-page .btn {
        font-size: 14px;
        padding: 8px 12px;
    }

    .preview-page .card-preview-wrapper {
        padding: 10px 5px;
    }

    .preview-page .share-info {
        padding: 15px 12px;
    }

    .preview-page .share-url-box input {
        font-size: 14px;
        padding: 8px 10px;
    }

    .preview-page .btn-copy {
        padding: 8px 12px;
        font-size: 14px;
    }

    .share-popup-container {
        padding: 15px;
    }

    .share-options {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .share-option {
        padding: 12px;
    }

    .share-option-icon {
        width: 36px;
        height: 36px;
        font-size: 18px;
    }

    .share-option-name {
        font-size: 14px;
    }

    .share-page {
        padding: 10px 2.5% 10px 2.5%;
    }

    .share-page .card-wrapper {
        padding: 8px;
    }

    .share-page .action-section {
        padding: 10px;
        flex-direction: column;
        width: 100%;
    }

    .share-page .btn {
        width: 100%;
        padding: 12px;
    }
}
