/* HeartLink 공통 화면 스타일 */
/* 관리자 페이지와 실제 앱 화면이 동일한 스타일을 공유합니다 */

/* confetti canvas 터치 통과 - 꽃가루 애니메이션이 화면 터치를 가로막지 않도록 */
canvas[style*="pointer-events"], canvas.confetti-canvas, body > canvas {
  pointer-events: none !important;
}

/* 전역 폰트 렌더링 최적화 - 모든 브라우저에서 일관성 보장 */
* {
    box-sizing: border-box;
    word-break: keep-all;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
    pointer-events: auto;
}

body {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
    touch-action: manipulation;
}

p, span, div, h1, h2, h3, h4, h5, h6, label, li, td, th {
    pointer-events: none;
}

a, button, input, select, textarea, video, canvas, [onclick], [data-testid] {
    pointer-events: auto !important;
}

/* 소프트 그라데이션 버튼 공통 스타일 */
.btn-soft-primary {
    background: linear-gradient(135deg, #FF6B8A 0%, #FF5A7A 50%, #FF4D6D 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 15px 24px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(255, 90, 122, 0.3), 0 2px 4px rgba(255, 90, 122, 0.15) !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
    letter-spacing: -0.2px;
}

.btn-soft-primary:active {
    transform: scale(0.97) translateY(1px) !important;
    box-shadow: 0 2px 8px rgba(255, 90, 122, 0.25), 0 1px 2px rgba(255, 90, 122, 0.1) !important;
    filter: brightness(0.95) !important;
}

.btn-soft-primary:disabled {
    background: linear-gradient(135deg, #E0E0E0 0%, #D5D5D5 100%) !important;
    box-shadow: none !important;
    cursor: not-allowed;
    color: #AAA !important;
}

.btn-soft-secondary {
    background: linear-gradient(135deg, #F8F8F8 0%, #F0F0F0 50%, #EAEAEA 100%) !important;
    color: #555 !important;
    border: 1px solid rgba(0,0,0,0.06) !important;
    border-radius: 14px !important;
    padding: 15px 24px !important;
    font-size: 15px !important;
    font-weight: 600 !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06), 0 1px 3px rgba(0, 0, 0, 0.04) !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
    letter-spacing: -0.2px;
}

.btn-soft-secondary:active {
    transform: scale(0.97) translateY(1px) !important;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.04) !important;
    filter: brightness(0.97) !important;
}

.btn-soft-success {
    background: linear-gradient(135deg, #5BC469 0%, #4CAF50 50%, #43A047 100%) !important;
    color: #FFFFFF !important;
    border: none !important;
    border-radius: 14px !important;
    padding: 15px 24px !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    box-shadow: 0 4px 15px rgba(76, 175, 80, 0.3), 0 2px 4px rgba(76, 175, 80, 0.15) !important;
    transition: all 0.2s ease !important;
    cursor: pointer;
    letter-spacing: -0.2px;
}

.btn-soft-success:active {
    transform: scale(0.97) translateY(1px) !important;
    box-shadow: 0 2px 8px rgba(76, 175, 80, 0.2) !important;
    filter: brightness(0.95) !important;
}

:root {
    /* 색상 */
    --hl-pink: #FF5A7A;
    --hl-dark: #333;
    --hl-gray: #999;
    --hl-light-gray: #F5F5F5;
    --hl-bg-gray: #FAFAFA;
    --hl-white: #FFFFFF;
    --hl-brown: #6B3745;
    --hl-light-brown: #8B4654;
    --hl-lighter-brown: #A65368;
    
    /* 크기 */
    --hl-logo-size: 64px;
    --hl-upload-button-size: 100%;
    --hl-progress-circle-size: 240px;
    --hl-qr-size: 200px;
    
    /* 간격 (고정 값) */
    --hl-body-padding: 16px;
    --hl-card-max-width: 420px;
    --hl-card-padding: 24px 24px 20px;
    --hl-card-border-radius: 24px;
    --hl-logo-margin-bottom: 8px;
    --hl-title-gap: 4px;
    --hl-title-margin-bottom: 12px;
    --hl-content-padding: 16px 0;
    --hl-content-margin-bottom: 12px;
}

/* 공통 컨테이너 */
.hl-body {
    background: var(--hl-white);
    min-height: 100vh;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, sans-serif;
    padding: var(--hl-body-padding);
    margin: 0;
    box-sizing: border-box;
}

.hl-container {
    text-align: center;
    max-width: var(--hl-card-max-width);
    width: 100%;
    background: var(--hl-white);
    border-radius: var(--hl-card-border-radius);
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: var(--hl-card-padding);
}

/* 로고 */
.hl-logo {
    width: var(--hl-logo-size);
    height: auto;
    margin-bottom: var(--hl-logo-margin-bottom);
}

/* 제목 */
.hl-title {
    font-size: 20px;
    font-weight: 700;
    color: var(--hl-pink);
    line-height: 1.5;
    margin-bottom: var(--hl-title-gap);
    text-align: center;
}

/* 제목 내 작은 로고 (Upload 표준과 동일) */
.hl-title-logo {
    height: 36px;
    width: auto;
    vertical-align: middle;
    margin-right: 8px;
    display: inline-block;
}

/* 표준 타이틀 (고정 크기) */
.hl-title-main {
    font-size: 18px;
    font-weight: 600;
    color: #FF4D6D;
    line-height: 1.4;
    margin-bottom: 4px;
    text-align: center;
}

.hl-title-sub {
    font-size: 15px;
    font-weight: 400;
    color: #555555;
    line-height: 1.5;
    margin-bottom: 12px;
    text-align: center;
}

.hl-subtitle {
    font-size: 26px;
    font-weight: 700;
    color: var(--hl-dark);
    margin-bottom: var(--hl-title-margin-bottom);
    text-align: center;
}

/* 중앙 콘텐츠 영역 (공통) */
.hl-content-area {
    padding: var(--hl-content-padding);
    margin-bottom: var(--hl-content-margin-bottom);
}

/* 업로드 영역 */
.hl-upload-area {
    padding: var(--hl-content-padding);
    margin-bottom: var(--hl-content-margin-bottom);
}

.hl-upload-button {
    width: 100%;
    height: auto;
    aspect-ratio: 4/5;
    border-radius: 16px;
    cursor: pointer;
    object-fit: cover;
}

/* Progress 영역 */
.hl-progress-area {
    padding: var(--hl-content-padding);
    margin-bottom: var(--hl-content-margin-bottom);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hl-progress-circle {
    width: var(--hl-progress-circle-size);
    height: var(--hl-progress-circle-size);
    position: relative;
}

.hl-progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 48px;
    font-weight: 700;
    color: var(--hl-pink);
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hl-progress-label {
    margin-top: 16px;
    font-size: 15px;
    color: var(--hl-pink);
    font-weight: 600;
    text-align: center;
}

/* 안내 텍스트 */
.hl-notice {
    font-size: 12px;
    color: var(--hl-gray);
    line-height: 1.7;
    margin-bottom: 4px;
}

.hl-warning {
    font-size: 11px;
    color: var(--hl-pink);
    line-height: 1.6;
    text-align: center;
    margin-bottom: 12px;
}

.hl-warning b {
    font-weight: 700;
}

/* Loading 화면 */
.hl-loading-container {
    text-align: center;
    padding: 20px;
}

.hl-heart-icon {
    width: 160px;
    height: 160px;
    object-fit: contain;
    animation: hl-pulse 1.5s ease-in-out infinite;
    filter: drop-shadow(0 4px 12px rgba(255, 90, 122, 0.3));
}

@keyframes hl-pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.1); opacity: 0.8; }
}

.hl-loading-title {
    font-size: 26px;
    font-weight: 700;
    margin-top: 24px;
    margin-bottom: 16px;
}

.hl-spinner {
    margin: 24px auto;
    width: 40px;
    height: 40px;
    border: 4px solid #F2F2F7;
    border-top-color: #FF3B30;
    border-radius: 50%;
    animation: hl-spin 1s linear infinite;
}

@keyframes hl-spin {
    to { transform: rotate(360deg); }
}

.hl-loading-message {
    font-size: 18px;
    font-weight: 400;
    color: #8E8E93;
    line-height: 1.6;
}

/* Success/Playback - Glassmorphism */
.hl-glass-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 24px;
    box-shadow: 0 8px 32px rgba(139, 70, 84, 0.2);
    padding: 40px 24px;
    width: 100%;
    max-width: var(--hl-card-max-width);
    text-align: center;
}

.hl-qr-container {
    background: rgba(255, 255, 255, 0.6);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 12px rgba(139, 70, 84, 0.1);
    display: inline-block;
}

/* 버튼 */
.hl-button {
    background: var(--hl-pink);
    color: var(--hl-white);
    border: none;
    border-radius: 12px;
    padding: 16px 28px;
    font-size: 16px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(255, 90, 122, 0.3);
}

.hl-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 90, 122, 0.4);
}

/* Preview 화면 */
.hl-preview-container {
    background: var(--hl-white);
    border-radius: var(--hl-card-border-radius);
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    padding: 8px 20px 20px;
    width: 100%;
    max-width: var(--hl-card-max-width);
    text-align: center;
}

.hl-preview-video {
    width: 100%;
    height: auto;
    aspect-ratio: 4/5;
    border-radius: 16px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.12);
    object-fit: cover;
    background: #000;
}

.hl-button-group {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.hl-button-secondary {
    flex: 1;
    background: #F0F0F0;
    border: none;
    border-radius: 8px;
    padding: 13px;
    font-size: 14px;
    font-weight: 600;
    color: #666;
    cursor: pointer;
}

.hl-button-primary {
    flex: 1;
    background: var(--hl-pink);
    border: none;
    border-radius: 8px;
    padding: 13px;
    font-size: 14px;
    font-weight: 600;
    color: var(--hl-white);
    box-shadow: 0 2px 8px rgba(255, 90, 122, 0.3);
    cursor: pointer;
}

.hl-terms-text {
    font-size: 10px;
    color: var(--hl-gray);
    line-height: 1.6;
    text-align: center;
}

.hl-terms-link {
    color: var(--hl-pink);
    font-weight: 600;
}

/* 유틸리티 클래스 - 재사용 가능한 기능적 스타일 */

/* 버튼 리셋 */
.hl-reset-button {
    border: none;
    padding: 0;
    background: none;
    cursor: pointer;
    width: 100%;
    display: block;
    margin: 0 auto;
}

/* 이벤트 비활성화 이미지 */
.hl-no-pointer {
    pointer-events: none;
    width: 100%;
    height: auto;
    aspect-ratio: 4/5;
    object-fit: cover;
    border-radius: 16px;
}

/* Floating 버튼 (프로모션 등) */
.hl-floating-button {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 100;
    background: rgba(255, 255, 255, 0.98);
    color: #666;
    border: 1px solid rgba(255, 255, 255, 0.8);
    border-radius: 24px;
    padding: 12px 20px;
    font-size: 14px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

/* 비디오/이미지 래퍼 (4:5 비율) */
.hl-media-wrapper {
    position: relative;
    width: 100%;
    border-radius: 16px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
}

.hl-media-wrapper img,
.hl-media-wrapper video {
    width: 100%;
    height: auto;
    aspect-ratio: 4/5;
    display: block;
    border-radius: 16px;
    object-fit: cover;
    background: #000;
}

/* Pink Header */
.hl-pink-header {
    background: #FF5A7A;
    padding: 24px;
    text-align: center;
    color: white;
    border-radius: 24px 24px 0 0;
    margin: -24px -24px 16px;
}

.hl-pink-header-icon {
    font-size: 40px;
    margin-bottom: 10px;
    line-height: 1;
}

.hl-pink-header-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
    line-height: 1.3;
    color: white;
}

.hl-pink-header-subtitle {
    font-size: 14px;
    opacity: 0.95;
    line-height: 1.4;
    margin: 0;
    color: white;
}

/* Bottom Tab Navigation */
.hl-bottom-tab {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: rgba(255, 255, 255, 0.98);
    border-top: 1px solid #F0F0F0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    padding-bottom: env(safe-area-inset-bottom);
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.hl-tab-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: #8E8E93;
    padding: 8px 4px;
    transition: all 0.2s;
}

.hl-tab-item:active {
    transform: scale(0.95);
}

.hl-tab-item.active {
    color: #FF5A7A;
}

.hl-tab-icon {
    font-size: 24px;
    margin-bottom: 4px;
}

.hl-tab-label {
    font-size: 11px;
    font-weight: 500;
}
