/*
 * BOOOOOK Style
 * 2025-12-12
 */

/* Reset & Fonts */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;500;700&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
    touch-action: pan-x pan-y; /* 핀치 줌 막기 */
}

html {
    background-color: #000 !important;
}

body {
    background-color: #000;
    color: #fff;
    font-family: 'Outfit', -apple-system, sans-serif;
    overflow: hidden;
    height: 100vh;
    height: 100dvh; /* 모바일 주소창 대응 */
    width: 100vw;
    display: flex;
    flex-direction: column;
    
    /* [NEW 2025-12-13] 부드러운 새로고침을 위한 transition */
    transition: opacity 0.1s ease-out;
    
    /* [NEW] 전체 텍스트 선택 완전 차단 (2025-12-12) */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important; /* iOS 롱프레스 메뉴 차단 */
}

/* [NEW] 모든 요소에 텍스트 선택 차단 */
* {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
    -webkit-touch-callout: none !important;
}

/* [NEW 2025-12-13] Safari 터치/클릭 호환성 */
button, a, [onclick], .control-btn, .social-btn {
    cursor: pointer !important;
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation; /* Safari 더블탭 줌 방지 */
}

/* ========== Flipbook & Pages ========== */
.magazine-viewport {
    width: 100%;
    height: 100%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.magazine {
    transition: margin-left 0.5s;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5); /* 책 전체 그림자 */
    /* [NEW 2025-12-13] Safari GPU 가속 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    will-change: transform;
}

.page {
    background-color: #fafafa; /* 완전 흰색보다는 살짝 미색이 종이 같음 */
    /* 뒷면에도 은은한 책 굴곡 그림자 추가 */
    background-image: linear-gradient(to right, rgba(0,0,0,0.15) 0%, rgba(255,255,255,0) 10%, rgba(255,255,255,0) 90%, rgba(0,0,0,0.05) 100%);
    overflow: hidden;
    display: block;
    box-shadow: 0 0 5px rgba(0,0,0,0.1);
    /* [NEW 2025-12-13] Safari GPU 가속 */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    will-change: transform; 
}

/* 실제 이미지가 들어가는 앞면 */
.page-content {
    width: 100%;
    height: 100%;
    background-size: cover; /* 100% 100% 대신 cover로 복구 (비율 유지) */
    background-repeat: no-repeat;
    position: absolute;
    top: 0; left: 0;
    
    /* 뒷면 비침 방지 */
    backface-visibility: hidden;
    -webkit-backface-visibility: hidden;
    transform: translate3d(0,0,0);
}

/* 책의 굴곡(Spine) 느낌을 주는 오버레이 (이미지 위에 얹음) */
.page-content::after {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    /* 왼쪽(제본 쪽)은 진하게, 오른쪽(넘기는 쪽)은 연하게 그림자 */
    background: linear-gradient(to right, 
        rgba(0,0,0,0.25) 0%, 
        rgba(0,0,0,0.1) 3%, 
        rgba(0,0,0,0) 12%, 
        rgba(0,0,0,0) 88%, 
        rgba(0,0,0,0.05) 97%, 
        rgba(0,0,0,0.1) 100%);
    pointer-events: none; /* 클릭 통과 */
    z-index: 10; /* 태그보다는 아래여야 함 (태그 z-index:20) */
}

.page-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #222;
    color: #666;
    font-size: 24px;
}

/* ========== Hotspot Tag (투명 원) ========== */
.hotspot {
    position: absolute;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    /* 투명한 하얀색 점선 테두리 + 아주 투명한 배경 */
    border: 2px dashed rgba(255, 255, 255, 0.6); 
    background: rgba(255, 255, 255, 0.05);
    box-shadow: 0 0 10px rgba(0,0,0,0.1);
    transform: translate(-50%, -50%);
    cursor: pointer;
    z-index: 20;
    transition: transform 0.2s, background 0.2s, border-color 0.2s;
    backdrop-filter: blur(1px); /* 살짝 블러 효과 추가 */
    display: flex;
    align-items: center;
    justify-content: center;
    
    /* [NEW] 페이드인 + 펄스 효과 (기본 태그) */
    animation: tagFadeIn 0.5s ease-out forwards, tagPulse 3s ease-in-out 0.5s infinite;
}

/* [NEW] 태그 페이드인 애니메이션 */
@keyframes tagFadeIn {
    from {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.5);
    }
    to {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }
}

/* [NEW] 기본 태그 숨쉬는 펄스 효과 */
@keyframes tagPulse {
    0%, 100% {
        transform: translate(-50%, -50%) scale(1);
        opacity: 1;
    }
    50% {
        transform: translate(-50%, -50%) scale(0.92);
        opacity: 0.7;
    }
}

/* [NEW] 스티커(아이콘) 모드에서는 펄스 효과 제거 */
.hotspot.icon-mode {
    animation: tagFadeIn 0.5s ease-out forwards; /* 펄스 없이 페이드인만 */
}

/* 십자가 아이콘 (CSS로 구현) */
.hotspot::before, .hotspot::after {
    content: '';
    position: absolute;
    background: rgba(255, 255, 255, 0.6);
    border-radius: 2px;
}

/* 가로선 */
.hotspot::before {
    width: 12px;
    height: 2px;
}

/* 세로선 */
.hotspot::after {
    width: 2px;
    height: 12px;
}

.hotspot:hover, .hotspot:active {
    background: rgba(255, 255, 255, 0.2);
    border-color: #fff;
    transform: translate(-50%, -50%) scale(1.1);
    border-style: solid; /* 호버 시 실선으로 변경 (선택사항) */
}

.hotspot:hover::before, .hotspot:active::before,
.hotspot:hover::after, .hotspot:active::after {
    background: #fff; /* 호버 시 십자가 진하게 */
}

/* ===== 드래그 앤 드롭 시작 ===== */
/* [NEW] 편집 모드에서 텍스트 선택 완전 차단 */
body.edit-mode {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

body.edit-mode * {
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* 태그 편집 모드: 드래그 가능 핸들 표시 */
.edit-mode .hotspot {
    cursor: move;
    border-color: #ffeb3b;
    border-style: solid; /* 편집 중엔 잘 보이게 실선 */
    background: rgba(255, 235, 59, 0.2);
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); /* 통통 튀는 효과 */
    -webkit-user-select: none !important;
    -moz-user-select: none !important;
    -ms-user-select: none !important;
    user-select: none !important;
}

/* [NEW] 드래그 중인 태그 스타일 */
.edit-mode .hotspot.dragging {
    transform: translate(-50%, -50%) scale(1.3) !important; /* 1.3배 확대 */
    z-index: 1000 !important; /* 다른 요소 위로 */
    box-shadow: 0 10px 30px rgba(255, 235, 59, 0.6), 
                0 0 20px rgba(255, 235, 59, 0.4) !important; /* 노란색 글로우 */
    border-color: #ffeb3b !important;
    border-width: 3px !important; /* 테두리 두껍게 */
    background: rgba(255, 235, 59, 0.4) !important; /* 더 진하게 */
    cursor: grabbing !important; /* 잡는 커서 */
    animation: none !important; /* 펄스 애니메이션 중지 */
}

/* [NEW] 드래그 중 십자가 표시 강화 */
.edit-mode .hotspot.dragging::before,
.edit-mode .hotspot.dragging::after {
    background: #ffeb3b !important; /* 노란색으로 */
    box-shadow: 0 0 5px rgba(255, 235, 59, 0.8);
}

/* [NEW] 아이콘 모드 드래그 */
.edit-mode .hotspot.icon-mode.dragging {
    filter: drop-shadow(0 8px 20px rgba(255, 235, 59, 0.8)) !important;
}

.edit-mode .hotspot.icon-mode.dragging i {
    transform: scale(1.3) !important; /* 아이콘도 확대 */
    filter: drop-shadow(0 8px 20px rgba(255, 235, 59, 0.8));
}
/* ===== 드래그 앤 드롭 끝 ===== */

/* ========== Hotspot Icon Variant (아이콘 모드) ========== */
.hotspot.icon-mode {
    background: none !important;
    border: none !important; /* 점선 제거 */
    box-shadow: none !important;
    border-radius: 0;
    width: auto;
    height: auto;
    backdrop-filter: none;
}

/* 십자가 제거 */
.hotspot.icon-mode::before, .hotspot.icon-mode::after {
    display: none;
}

.hotspot.icon-mode i {
    font-size: 28px; /* 아이콘 크기 약간 키움 */
    color: #fff;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.5)); /* 그림자 */
    transition: transform 0.2s;
}

.hotspot.icon-mode:hover i {
    transform: scale(1.2);
    text-shadow: 0 0 10px rgba(255,255,255,0.8);
}

/* ========== Modal Overlay (Information) ========== */
.modal-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10000; /* [FIX 2025-12-13] 플로팅 버튼(9000)보다 위에 표시 */
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s;
}

.modal-overlay.active {
    display: flex;
    opacity: 1;
}

/* [NEW] 모달 카드 (어두운 테마) */
.modal-card {
    background: #1a1a1a;
    color: #fff;
    width: 90%;
    max-width: 320px;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s;
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
}

.modal-overlay.active .modal-card {
    transform: scale(1);
}

.modal-content {
    background: #fff;
    color: #000;
    width: 80%;
    max-width: 300px;
    padding: 25px;
    border-radius: 20px;
    text-align: center;
    transform: scale(0.9);
    transition: transform 0.3s;
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
}

.modal-overlay.active .modal-content {
    transform: scale(1);
}

/* ========== Floating Tooltip (New) ========== */
.tag-tooltip {
    position: absolute;
    background: rgba(0, 0, 0, 0.85);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    pointer-events: auto;
    z-index: 100;
    opacity: 0;
    transform: translate(-50%, 10px); /* 중앙 정렬 + 아래에서 올라오는 효과 */
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    white-space: nowrap;
    backdrop-filter: blur(4px);
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

.tag-tooltip.show {
    opacity: 1;
    transform: translate(-50%, -45px); /* 태그 위쪽으로 이동 */
}

/* [NEW] 한마디 모드일 때 점(아이콘) 숨기기 */
.hotspot.hidden-dot {
    display: none !important; 
}

/* [NEW] 편집 모드에서는 점이 보여야 수정 가능함! */
body.edit-mode .hotspot.hidden-dot {
    display: flex !important;
    opacity: 0.5; /* 살짝 투명하게 해서 '숨겨진 상태'임을 알림 */
}

/* [NEW] 한마디 모드일 때 태그가 사라지면 툴팁 위치 조정 */
/* 점이 없어졌으니 툴팁이 그 자리(중심)에 오도록 */
.tag-tooltip.always-visible {
    opacity: 1;
    transform: translate(-50%, -50%) !important; /* 정중앙 */
    margin-top: 0;
    /* 만약 점이 있으면 위로 띄우지만, 점이 사라진 경우엔 제자리가 나음 */
}

/* 편집 모드에서 점이 다시 생기면 툴팁은 위로 */
body.edit-mode .tag-tooltip.always-visible {
    transform: translate(-50%, -45px) !important;
}

/* 꼬리표 (Triangle) */
.tag-tooltip::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 5px 5px 0;
    border-style: solid;
    border-color: rgba(0, 0, 0, 0.85) transparent transparent transparent;
}

.modal-title { font-weight: 600; font-size: 16px; margin-bottom: 5px; }
.modal-desc { font-size: 14px; opacity: 0.7; margin-bottom: 20px; line-height: 1.4; }

.modal-btn {
    display: inline-block;
    background: #000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 25px;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

/* ========== Top Control Bar ========== */
.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: calc(20px + env(safe-area-inset-top)) 20px 10px;
    z-index: 100;
    pointer-events: none;
}


/* 상태 메시지 */
.editor-status {
    position: fixed;
    top: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #fff;
    padding: 14px 24px;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    display: none;
    z-index: 1500;
    pointer-events: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

/* ========== Intro Overlay & Animation ========== */
#intro-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0; /* 모든 방향 0 */
    width: 100%; height: 100%;
    background: #000;
    z-index: 9999;
    display: -webkit-flex; /* Safari용 */
    display: flex;
    -webkit-justify-content: center; /* Safari용 */
    justify-content: center;
    -webkit-align-items: center; /* Safari용 */
    align-items: center;
    -webkit-transition: background-color 0.8s ease-in-out;
    transition: background-color 0.8s ease-in-out; 
    pointer-events: auto;
}

#intro-overlay.bg-transparent {
    background-color: transparent !important;
    pointer-events: none;
}

/* 인트로 텍스트 */
.intro-text {
    /* [FIX 2025-12-13] Safari 호환성을 위해 position 방식 변경 */
    position: relative;
    color: #fff;
    font-size: 40px;
    font-weight: 800;
    letter-spacing: 5px;
    display: -webkit-flex; /* Safari */
    display: flex;
    -webkit-justify-content: center; /* Safari 중앙 정렬 */
    justify-content: center;
    -webkit-align-items: baseline; /* Safari */
    align-items: baseline;
    font-family: 'Outfit', sans-serif;
    -webkit-transition: all 1s cubic-bezier(0.19, 1, 0.22, 1); /* Safari */
    transition: all 1s cubic-bezier(0.19, 1, 0.22, 1);
    z-index: 10000;
    white-space: nowrap;
    /* 아래로 이동할 때 사용 */
    -webkit-transform: translateY(0);
    transform: translateY(0);
}

/* 도킹 상태 (하단 이동) */
.intro-text.to-footer {
    /* top은 JS로 정확하게 꽂아넣음 */
    font-size: 20px !important; 
    letter-spacing: 0.5px !important; /* 폭 더 줄임! */
    line-height: 1 !important;
    margin: 0 !important;
    
    /* transform은 JS에서 설정한 translate(-50%, -50%)를 따름 (중심 기준) */
    
    opacity: 1; 
}

/* 도킹 시 내부 요소 스타일 초기화 & 간격 제거 */
.intro-text.to-footer .intro-char {
    margin: 0 !important; /* 글자 사이 간격 완전 제거 -> 중앙으로 모임 */
    animation: none; 
    transform: none !important;
}
.intro-text.to-footer span {
    transform: none !important;
}

/* 글자 하나하나 */
.intro-char {
    position: relative;
    display: inline-block;
    width: auto; /* 고정폭 해제! 그래야 작아짐 */
    min-width: 15px; 
    text-align: center;
    margin: 0 1px; /* 2px -> 1px (초밀착) */
    padding: 0 2px; 
    animation: charBounce 2.5s ease-in-out 1 forwards;
    transform-origin: bottom center;
    
    /* 폭 줄어드는 애니메이션 핵심! */
    transition: margin 1.2s cubic-bezier(0.19, 1, 0.22, 1);
}

.intro-text span {
    display: inline-block;
}

/* 점 (.) */
.dot {
    position: absolute;
    left: 50%; bottom: 0;
    transform: translateX(-50%);
    opacity: 1;
    animation: dotFadeOut 2.5s ease-in-out 1 forwards;
}

/* 원 (O) */
.circle-o {
    opacity: 0;
    animation: circleFadeIn 2.5s ease-in-out 1 forwards;
}

/* 인트로 하단 로고 */
.intro-logo {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: auto;
    opacity: 0.7;
    z-index: 10001;
    transition: opacity 0.5s ease;
}

/* 배경 투명해질 때 로고도 사라짐 */
#intro-overlay.bg-transparent .intro-logo {
    opacity: 0;
}

/* ========== Always Visible Tooltip (강제 표시) ========== */
.tag-tooltip.always-visible {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translate(-50%, -45px) !important; /* 기본 위치 (아이콘 위) */
    z-index: 80; /* 클릭 툴팁보다는 뒤 */
    background: rgba(0, 0, 0, 0.6); 
    pointer-events: auto; /* 클릭 가능 */
    display: block !important;
}

/* 아이콘 모드일 때는 툴팁 위치 조금 더 위로 */
.hotspot.icon-mode + .tag-tooltip.always-visible {
    transform: translate(-50%, -55px) !important;
}


/* 딜레이 설정 */
.delay-1, .delay-1 .dot, .delay-1 .circle-o { animation-delay: 0.0s; }
.delay-2, .delay-2 .dot, .delay-2 .circle-o { animation-delay: 0.15s; }
.delay-3, .delay-3 .dot, .delay-3 .circle-o { animation-delay: 0.3s; }
.delay-4, .delay-4 .dot, .delay-4 .circle-o { animation-delay: 0.45s; }
.delay-5, .delay-5 .dot, .delay-5 .circle-o { animation-delay: 0.6s; }

/* 키프레임 정의 */
@keyframes charBounce {
    0% { transform: translateY(0) scale(1); }
    40% { transform: translateY(-25px) scale(1.4); } 
    100% { transform: translateY(0) scale(1); }
}

@keyframes dotFadeOut {
    0% { opacity: 1; }
    30% { opacity: 0; }
    70% { opacity: 0; }
    100% { opacity: 1; }
}

@keyframes circleFadeIn {
    0% { opacity: 0; transform: scale(0.5); }
    30% { opacity: 1; transform: scale(1); }
    70% { opacity: 1; transform: scale(1); }
    100% { opacity: 0; transform: scale(0.5); }
}

/* ========== Button Groups ========== */
.btn-group-left, .btn-group-right {
    display: flex;
    flex-direction: column; /* [NEW] 세로 정렬 */
    gap: 15px;
    pointer-events: auto;
}

/* ========== Bottom Bar & Pagination ========== */
.bottom-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 80px;
    z-index: 100;
    display: flex;
    justify-content: center;
    align-items: center;
    pointer-events: auto;
    background: linear-gradient(to top, rgba(0,0,0,0.5), transparent);
}

/* Pagination Container */
/* 태그 에디터/업로드 모달/통계 모달 (Liquid Glass) */
/* 태그 에디터/업로드 모달/통계 모달 (Liquid Glass) */
.tag-editor-content {
    background: rgba(30, 30, 30, 0.75); /* 투명도 높임 */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px; /* 더 둥글게 */
    padding: 25px;
    width: 90%;
    max-width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    position: relative;
    color: #fff;
    max-height: 80vh;
    overflow-y: auto;
}

/* Pagination Container */
.boooook-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.5);
    font-family: 'Outfit', sans-serif;
    font-weight: 300;
    font-size: 20px; /* 다시 당당하게 확장! */
    letter-spacing: 4px; /* 시원한 자간 */
    line-height: 1;
    z-index: 91;
}

.indicator-dots {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0; 
}

/* 확장 복구 */
.boooook-char {
    display: inline-block;
    transition: all 0.3s ease;
    margin: 0 3px; /* 적당한 간격 */
    transform: none; 
}

.boooook-dot {
    font-size: 16px;
    transform: translateY(-2px);
    opacity: 0.5;
}

/* ============================================
   [FIX 2025-12-13] 페이지네이션 O 통통 튀는 애니메이션
   ============================================ */
.boooook-active {
    opacity: 1;
    color: #fff;
    font-size: 14px; /* 활성화된 녀석만 살짝 크게 */
    font-weight: 800;
    transform: translateY(0) scale(1.1); /* 활성화 강조 */
    text-shadow: 0 0 10px rgba(255, 255, 255, 0.6);
    z-index: 10; /* 겹칠 때 위로 */
    animation: dotBounce 0.8s ease-out forwards;
}

/* O가 두 번 천천히 통통 튀는 애니메이션 */
@keyframes dotBounce {
    0% { 
        transform: translateY(0) scale(0.3); 
        opacity: 0;
    }
    15% { 
        transform: translateY(-12px) scale(1.3); 
        opacity: 1;
    }
    30% { 
        transform: translateY(0) scale(1); 
    }
    50% { 
        transform: translateY(-7px) scale(1.2); 
    }
    70% { 
        transform: translateY(0) scale(1.1); 
    }
    100% { 
        transform: translateY(0) scale(1.1); 
        opacity: 1;
    }
}
/* ============================================ */

.page-count {
    font-size: 10px;
    opacity: 0.5;
    margin-top: 5px;
    font-weight: 400;
    letter-spacing: 0.5px;
    width: 100%; /* 너비 꽉 채우고 */
    text-align: center; /* 텍스트 정렬 확실하게! */
}

/* ========== Control Buttons (2025-12-12 수정) ========== */
.control-btn {
    width: 44px !important;
    height: 44px !important;
    border-radius: 50% !important;
    background: #ffffff !important; /* 완전 흰색 */
    background-color: #ffffff !important;
    color: #444444 !important; /* 진한 회색 */
    display: flex !important;
    justify-content: center !important;
    align-items: center !important;
    cursor: pointer !important;
    font-size: 18px !important;
    border: none !important;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15) !important;
    transition: all 0.2s !important;
    opacity: 1 !important; /* 투명도 없음 */
}

.control-btn i,
.control-btn .fas,
.control-btn .fa {
    color: #444444 !important; /* 아이콘도 진한 회색 */
}

.control-btn:active {
    transform: scale(0.95);
    background: #f0f0f0 !important;
}

/* 편집 모드 플로팅 버튼 컨테이너 */
.edit-floating-btns {
    display: none;
    position: fixed;
    left: 50%;
    transform: translateX(-50%);
    bottom: 86px; /* [FIX 2025-12-13] 24px 아래로 */
    z-index: 9000; /* 사진 위에 표시되도록 높은 z-index */
    gap: 15px;
    align-items: center;
    justify-content: center;
}

body.edit-mode .edit-floating-btns {
    display: flex !important;
}

/* [NEW 2025-12-13] 모달 열릴 때 플로팅 버튼 숨기기 */
body.edit-mode .modal-overlay[style*="display: flex"] ~ .edit-floating-btns,
body.edit-mode .modal-overlay[style*="display:flex"] ~ .edit-floating-btns,
body.edit-mode .modal-overlay.active ~ .edit-floating-btns {
    display: none !important;
}

.upload-btn {
    width: 56px;
    height: 56px;
    background: #fff;
    color: #000;
    font-size: 24px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

/* 이미지 위치 조정 버튼 - 활성화 시 스타일 */
#moveImageBtn.active {
    background: #ffeb3b !important;
    color: #000 !important;
    border-color: #ffeb3b !important;
}

/* [NEW] 페이지 삭제 버튼 스타일 */
/* [NEW] 페이지 삭제 버튼 스타일 (핑크빛 붉은색) */
.delete-page-btn {
    background: #ff6b81 !important;
    color: #fff !important;
    border-color: #ff6b81 !important;
}

.delete-page-btn:hover, .delete-page-btn:active {
    background: #ff4757 !important;
    border-color: #ff4757 !important;
    transform: scale(1.05);
}

/* ========== Custom Modal (스티커 선택 등) ========== */
/* ========== Custom Modal (스티커 선택 등) ========== */
.custom-modal {
    position: absolute; /* fixed -> absolute (목업 내부용) */
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 6000;
    backdrop-filter: blur(5px);
    border-radius: 30px; /* 목업 둥근 모서리 맞춤 */
}

/* ... */

/* ========== Tag Editor Modal ========== */
.tag-editor-overlay {
    position: fixed; /* [FIX 2025-12-13] 스마트폰에서도 작동하도록 fixed */
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 10000; /* [FIX 2025-12-13] 플로팅 버튼(9000)보다 위에 표시 */
    display: flex;
    justify-content: center;
    align-items: flex-start; /* [FIX 2025-12-13] 위쪽 정렬 */
    padding-top: 80px; /* [FIX 2025-12-13] 상단 여백 */
    backdrop-filter: blur(5px);
    border-radius: 0; /* [FIX 2025-12-13] 스마트폰에서는 둥근 모서리 불필요 */
    box-sizing: border-box; /* padding 포함 */
}

.tag-editor-content {
    background: #1a1a1a;
    width: 85%;
    max-width: 280px;
    border-radius: 20px;
    padding: 16px;
    border: 1px solid rgba(255,255,255,0.1);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
    color: #fff;
    position: relative;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
}

.tag-editor-content h3 {
    margin: 0 0 20px 0;
    text-align: center;
    font-size: 18px;
    font-weight: 600;
}

.editor-section { margin-bottom: 12px; }
.editor-section label { display:block; margin-bottom:4px; font-size:11px; color:rgba(255,255,255,0.7); }
.editor-section input[type="text"] {
    width: 100%;
    padding: 8px 10px;
    border-radius: 8px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    font-size: 12px;
    outline: none;
}

.editor-section input:focus {
    border-color: #fff;
    background: #444;
}

/* Icon Grid */
.icon-grid {
    display: flex;
    gap: 8px;
    justify-content: center;
    flex-wrap: wrap;
}

.icon-option {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    border: 2px solid transparent;
    transition: all 0.2s;
}

.icon-option:hover {
    background: #444;
}

.icon-option.selected {
    background: #fff;
    color: #000;
    border-color: #fff;
}

.preview-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 1px dashed #888;
    background: #666;
}

/* Modal Buttons */
.save-tag-btn, .cancel-tag-btn, .delete-tag-btn {
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    cursor: pointer;
    font-size: 14px;
    transition: transform 0.1s;
}

.save-tag-btn { background: #fff; color: #000; }
.cancel-tag-btn { background: #333; color: #fff; }
.delete-tag-btn { background: #ff4444; color: #fff; }

.save-tag-btn:active, .cancel-tag-btn:active, .delete-tag-btn:active {
    transform: scale(0.98);
}

.liquid-close-btn {
    position: absolute;
    bottom: -60px;
    left: 50%;
    transform: translateX(-50%);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 18px;
    border: 1px solid rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    z-index: 3001;
}

/* ========== Switch Toggle ========== */
.switch {
    position: relative;
    display: inline-block;
    width: 40px;
    height: 22px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #444;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 16px;
    width: 16px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #fff;
}

input:checked + .slider:before {
    transform: translateX(18px);
    background-color: #000;
}

/* ========== 좋아요 & 공유 버튼 ========== */
.social-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.2s ease;
}

.social-btn:hover {
    transform: scale(1.1);
}

.social-btn:active {
    transform: scale(0.95);
}

/* 좋아요 하트 (기본: 빈 하트) */
#likeBtn i {
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* 좋아요 활성화: 꽉 찬 붉은 하트 */
#likeBtn.liked i {
    color: #ff4757 !important;
    text-shadow: 0 0 10px rgba(255, 71, 87, 0.5);
}

/* 하트 펄스 애니메이션 (좋아요 시) */
@keyframes heartPulse {
    0% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1); }
    75% { transform: scale(1.15); }
    100% { transform: scale(1); }
}

#likeBtn.liked i {
    animation: heartPulse 0.5s ease-out;
}

/* 편집 모드 시 공유 버튼 숨김 */
body.edit-mode .hide-on-edit {
    display: none !important;
}

/* 편집 모드에서만 표시되는 요소 (설정 버튼 등) */
.show-on-edit {
    display: none !important;
}

body.edit-mode .show-on-edit {
    display: flex !important;
}

/* 편집 모드에서 플로팅 버튼 컨테이너 표시 */
body.edit-mode .edit-floating-btns {
    display: flex !important;
}

/* 인트로 중에는 좋아요/공유 버튼 숨김 */
body:has(#intro-overlay) .bottom-bar .social-btn {
    opacity: 0 !important;
    pointer-events: none;
}

/* 인트로 없을 때 버튼 보이도록 (기본값) */
.bottom-bar .social-btn {
    opacity: 1;
}

/* ========== [NEW] 삭제 확인 모달 ========== */
.delete-confirm-content {
    text-align: center;
    padding: 30px 25px;
    max-width: 280px;
}

.delete-confirm-content .delete-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: deleteShake 0.5s ease-in-out;
}

@keyframes deleteShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.delete-confirm-content .modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.delete-confirm-content .modal-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    margin-bottom: 25px;
}

.delete-confirm-content .modal-actions {
    display: flex;
    gap: 12px;
}

.delete-confirm-content .btn-cancel,
.delete-confirm-content .btn-delete {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-confirm-content .btn-cancel {
    background: #333;
    color: #fff;
}

.delete-confirm-content .btn-cancel:hover {
    background: #444;
}

.delete-confirm-content .btn-delete {
    background: #ff4444;
    color: #fff;
}

.delete-confirm-content .btn-delete:hover {
    background: #cc0000;
}

.delete-confirm-content .btn-delete:active,
.delete-confirm-content .btn-cancel:active {
    transform: scale(0.98);
}

/* ========== [NEW] FAB 버튼 (오른쪽 하단 플로팅) - 2025-12-12 수정 ========== */
.login-fab {
    position: fixed;
    bottom: 100px;
    right: calc(50% - 200px); /* 플립북 안쪽으로 */
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.fab-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(30, 30, 30, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab-btn:hover {
    transform: scale(1.1);
    background: rgba(50, 50, 50, 0.95);
}

.fab-btn:active {
    transform: scale(0.95);
}

/* ========== PC용 핸드폰 목업 프레임 ========== */
/* 모바일에서는 전체 화면 */
.phone-mockup-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.phone-frame {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
}

.phone-notch {
    display: none;
}

.camera-light {
    display: none;
}

.phone-screen {
    width: 100%;
    height: 100%;
    position: relative;
    overflow: hidden;
    /* [FIX 2025-12-13] PC 모서리 흰색 문제 해결 */
    background: #000;
    border-radius: inherit; /* 부모(phone-frame)의 border-radius 상속 */
}

/* === 모바일에서 PC 전용 요소 숨김 (2025-12-12) === */
.floating-icons,
.keyboard-nav,
.keyboard-title {
    display: none;
}
/* === 모바일 숨김 끝 === */

/* PC (768px 이상)에서 핸드폰 프레임 표시 */
@media (min-width: 768px) {
    body {
        background: transparent;
        display: flex;
        justify-content: center;
        align-items: center;
        overflow: hidden;
    }
    
    .phone-mockup-container {
        position: fixed;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 399px; /* 375 + padding */
        height: 836px; /* 812 + padding */
        max-height: 95vh;
    }
    
    .phone-frame {
        width: 100%;
        height: 100%;
        background: linear-gradient(145deg, #2a2a2a 0%, #1a1a1a 100%);
        border-radius: 50px;
        padding: 12px;
        position: relative;
        box-sizing: border-box;
    }
    
    .phone-notch {
        display: flex;
        align-items: center;
        justify-content: flex-end;
        padding-right: 12px;
        position: absolute;
        top: 20px;
        left: 50%;
        transform: translateX(-50%);
        width: 120px;
        height: 28px;
        background: #000;
        border-radius: 20px;
        z-index: 10000;
    }
    
    /* 녹색 카메라 불빛 */
    .camera-light {
        display: block !important;
        width: 8px;
        height: 8px;
        background: rgba(50, 205, 50, 0.6);
        border-radius: 50%;
        box-shadow: 0 0 6px rgba(50, 205, 50, 0.8);
        animation: cameraGlow 3s ease-in-out infinite;
    }
    
    @keyframes cameraGlow {
        0%, 100% {
            opacity: 0.3;
            box-shadow: 0 0 4px rgba(50, 205, 50, 0.5);
        }
        50% {
            opacity: 1;
            box-shadow: 0 0 10px rgba(50, 205, 50, 1);
        }
    }
    
    .phone-screen {
        width: 375px;
        height: 812px;
        background: #1a1a1a;
        border-radius: 40px;
        overflow: hidden;
        position: relative;
        /* transform을 추가하면 fixed 요소들이 이 컨테이너 기준으로 위치함 */
        transform: translateZ(0);
    }
    
    /* 핸드폰 안의 fixed 요소들 위치 조정 - !important로 강제 적용 */
    .phone-screen .top-bar {
        position: absolute !important;
        top: 0 !important;
        left: 0 !important;
        width: 375px !important;
        padding-top: 35px;
        z-index: 100;
    }
    
    .phone-screen .bottom-bar {
        position: absolute !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 375px !important;
        height: 80px !important;
        border-radius: 0 0 40px 40px;
        z-index: 100;
    }
    
    .phone-screen .magazine-viewport {
        width: 375px !important;
        height: 812px !important;
        position: absolute !important;
        top: 0;
        left: 0;
    }
    
    .phone-screen .magazine-viewport .container {
        width: 375px !important;
        height: 812px !important;
    }
    
    .phone-screen .magazine-viewport .magazine {
        width: 375px !important;
        height: 812px !important;
    }
    
    .phone-screen .edit-floating-btns {
        position: absolute !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        bottom: 86px !important; /* [FIX 2025-12-13] 24px 아래로 */
        z-index: 1100; /* [NEW] 버튼 클릭 가능하도록 z-index 상향 조정 */
        pointer-events: auto !important;
    }
    
    /* [FIX 2025-12-13] PC 목업 안에서는 absolute로 유지 */
    .phone-screen .tag-editor-overlay {
        position: absolute !important;
        border-radius: 30px !important;
    }
    
    .phone-screen #intro-overlay {
        position: absolute;
        top: 0;
        left: 0;
        width: 375px;
        height: 812px;
    }
    
    /* [FIX 2025-12-13] PC 목업 안에서 인트로 텍스트도 absolute */
    .phone-screen .intro-text {
        position: absolute !important;
    }
}

/* ========== Apple Liquid Glass Toast ========== */
.liquid-glass-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    z-index: 99999;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.liquid-glass-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.liquid-glass-toast .toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 28px;
    background: rgba(26, 26, 26, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 50px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.liquid-glass-toast .toast-content i {
    font-size: 20px;
    color: #4ade80;
    filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.5));
}

/* ========== PC용 키보드 네비게이션 ========== */
/* 모바일에서는 숨김 */
.keyboard-nav {
    display: none;
}

/* PC에서만 표시 */
@media (min-width: 768px) {
    .keyboard-nav {
        display: flex;
        flex-direction: column;
        align-items: center;
        position: fixed;
        top: 50%;
        left: calc(50% + 250px); /* 목업 오른쪽 */
        transform: translateY(-50%);
        z-index: 1000;
    }
    
    .keyboard-buttons {
        display: flex;
        gap: 15px;
    }
    
    .keyboard-btn {
        width: 54px;
        height: 44px;
        background: linear-gradient(180deg, #4a4a4a 0%, #2d2d2d 100%);
        border: none;
        border-radius: 6px;
        color: rgba(255, 255, 255, 0.9);
        font-size: 16px;
        cursor: pointer;
        transition: all 0.1s;
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        /* 키캡 3D 효과 */
        box-shadow: 
            0 4px 0 #1a1a1a,
            0 6px 10px rgba(0, 0, 0, 0.4),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    .keyboard-btn:hover {
        background: linear-gradient(180deg, #5a5a5a 0%, #3d3d3d 100%);
        color: #fff;
    }
    
    .keyboard-btn:active {
        transform: translateY(3px);
        box-shadow: 
            0 1px 0 #1a1a1a,
            0 2px 5px rgba(0, 0, 0, 0.3),
            inset 0 1px 0 rgba(255, 255, 255, 0.1);
    }
    
    .keyboard-hint {
        margin-top: 15px;
        font-size: 11px;
        color: rgba(255, 255, 255, 0.4);
        letter-spacing: 0.5px;
    }
    
    /* 스타일리시 제목 */
    .keyboard-title {
        display: block; /* PC에서 표시 */
        text-align: center;
        margin-bottom: 30px;
    }
    
    .keyboard-badge {
        display: inline-block;
        padding: 8px 20px;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        border-radius: 50px;
        font-size: 12px;
        font-weight: 600;
        color: rgba(255, 255, 255, 0.8);
        letter-spacing: 2px;
        margin-bottom: 20px;
    }
    
    .keyboard-headline {
        font-size: 42px;
        font-weight: 700;
        color: #fff;
        margin: 0 0 10px 0;
        letter-spacing: -1px;
    }
    
    .keyboard-subheadline {
        font-size: 48px;
        font-weight: 700;
        background: linear-gradient(135deg, #ff6b9d 0%, #c44aff 50%, #ff6b9d 100%);
        -webkit-background-clip: text;
        -webkit-text-fill-color: transparent;
        background-clip: text;
        margin: 0;
    }
    
    /* 떠다니는 아이콘들 */
    .floating-icons {
        display: block; /* PC에서 표시 */
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        pointer-events: none;
        z-index: 1;
    }
    
    .floating-icon {
        position: absolute;
        font-size: 48px;
        opacity: 0.4;
        animation: float 6s ease-in-out infinite;
        filter: drop-shadow(0 4px 8px rgba(0,0,0,0.3));
    }
    
    /* 5개 아이콘 - 오빠 지정 위치 */
    .floating-icon:nth-child(1) { top: 22%; left: 30%; animation-delay: 0s; } /* 💜 하트 */
    .floating-icon:nth-child(2) { top: 70%; left: 30%; animation-delay: 1s; } /* 🔗 링크 */
    .floating-icon:nth-child(3) { top: 25%; right: 28%; animation-delay: 2s; } /* 📸 사진기 */
    .floating-icon:nth-child(4) { top: 70%; right: 28%; animation-delay: 3s; } /* 📚 책 */
    .floating-icon:nth-child(5) { top: 45%; right: 70%; animation-delay: 0.5s; } /* ✨ 별 */
    
    @keyframes float {
        0%, 100% { transform: translateY(0) rotate(0deg); }
        50% { transform: translateY(-15px) rotate(8deg); }
    }
}

/* === 로그인 FAB 버튼 (2025-12-12 수정) === */
.login-fab {
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    display: block; /* 항상 표시 */
}

/* PC에서는 플립북 오른쪽 안쪽에 위치 */
@media (min-width: 768px) {
    .login-fab {
        right: calc(50% - 200px); /* 플립북 안쪽으로 */
        bottom: 50px;
    }
}

.login-fab .fab-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    text-decoration: none;
}

.login-fab .fab-btn:hover {
    transform: scale(1.1);
    background: rgba(0, 0, 0, 0.9);
}

/* === 로그인 모달 === */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.modal-overlay.active {
    display: flex;
}

.modal-card {
    background: rgba(30, 30, 30, 0.75); /* 투명도 높임 */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: 24px; /* 더 둥글게 */
    padding: 30px;
    width: 90%;
    max-width: 320px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
}

.modal-title {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    margin-bottom: 20px;
    text-align: center;
}

.form-group {
    margin-bottom: 15px;
}

.form-input {
    width: 100%;
    padding: 12px 16px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: #fff;
    font-size: 14px;
    box-sizing: border-box;
}

.form-input::placeholder {
    color: rgba(255, 255, 255, 0.5);
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-cancel, .btn-submit {
    flex: 1;
    padding: 14px;
    border-radius: 14px; /* 버튼도 둥글게 */
    border: none;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    /* [NEW 2025-12-13] Safari 터치 반응 개선 */
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.btn-cancel {
    background: rgba(255, 255, 255, 0.2);
    color: #fff;
}

.btn-cancel:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.02);
}

.btn-submit {
    background: #fff;
    color: #000;
}

.btn-submit:hover {
    background: #f0f0f0;
    transform: scale(1.02);
}

.btn-cancel:active, .btn-submit:active {
    transform: scale(0.98);
}

/* ========== Toast Message (2025-12-12 Unified) ========== */
.toast-message {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    color: #fff;
    padding: 18px 28px;
    border-radius: 50px;
    font-size: 15px;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
    pointer-events: none;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: flex;
    align-items: center;
    justify-content: center;
}

.toast-message.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

/* ========== Liquid Glass Toast (New Helper) ========== */
.liquid-glass-toast {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    opacity: 0;
    z-index: 99999;
    pointer-events: none;
    transition: all 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.liquid-glass-toast.show {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
}

.liquid-glass-toast .toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 28px;
    background: rgba(30, 30, 30, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 50px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
}
.liquid-glass-toast .toast-content i {
    font-size: 20px;
    color: #4ade80;
    filter: drop-shadow(0 0 6px rgba(74, 222, 128, 0.5));
}


/* ========== Stats Modal (2025-12-12 깔끔하게 정리) ========== */
.stats-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.2s;
}

.stats-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.stats-card-icon {
    font-size: 28px;
    margin-bottom: 8px;
}

.stats-card-label {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 6px;
}

.stats-card-value {
    font-size: 24px;
    font-weight: 700;
    color: #fff;
}

/* ========== [NEW] 삭제 확인 모달 스타일 (2025-12-12) ========== */
.delete-confirm-content {
    text-align: center;
    padding: 30px 25px;
    max-width: 280px;
}

.delete-confirm-content .delete-icon {
    font-size: 48px;
    margin-bottom: 15px;
    animation: deleteShake 0.5s ease-in-out;
}

@keyframes deleteShake {
    0%, 100% { transform: rotate(0deg); }
    25% { transform: rotate(-10deg); }
    75% { transform: rotate(10deg); }
}

.delete-confirm-content .modal-title {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 10px;
    color: #fff;
}

.delete-confirm-content .modal-desc {
    font-size: 14px;
    color: rgba(255,255,255,0.6);
    line-height: 1.5;
    margin-bottom: 25px;
}

.delete-confirm-content .modal-actions {
    display: flex;
    gap: 12px;
}

.delete-confirm-content .btn-cancel,
.delete-confirm-content .btn-delete {
    flex: 1;
    padding: 14px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}

.delete-confirm-content .btn-cancel {
    background: #333;
    color: #fff;
}

.delete-confirm-content .btn-cancel:hover {
    background: #444;
}

.delete-confirm-content .btn-delete {
    background: #ff8fab; /* 연분홍 핑크 */
    color: #fff;
}

.delete-confirm-content .btn-delete:hover {
    background: #ff5d8f;
    transform: scale(1.02);
}

/* [NEW] 페이지 삭제 버튼 (플로팅)만 핑크색으로 */
.delete-page-btn {
    color: #ff8fab !important; /* 아이콘 색상 (배경이 흰색일 경우) 또는 배경색 */
}
/* 만약 버튼 자체가 핑크 배경이어야 한다면: */
/*
.delete-page-btn {
    background: #ff8fab !important;
    color: #fff !important;
}
*/
/* 현재 control-btn은 흰색 배경에 검은 아이콘이 기본이므로, 아이콘을 핑크로 하거나 배경을 핑크로?
   "삭제 연홍빛분홍색 색상 바꿔주고" -> 보통 위험 버튼은 유채색 배경. 
   하지만 다른 버튼들과 통일성을 위해 배경은 흰색 유지하고 아이콘만 핑크? 
   아니면 배경을 핑크? 사용자 의도는 "삭제버튼은 빨간색 말고..." 였으므로 모달 버튼을 말한 것일 수도 있지만,
   지금 문맥상 이 버튼도 바꾸길 원하는 듯. 모달 버튼은 이미 바꿨음.
   혹시 모달 버튼 색이 마음에 안 들어서 다시 말한 건가?
   "삭제 연홍빛분홍색 색상 바꿔주고" <- 634에 요청. 637에서 모달 버튼은 이미 #ff8fab로 되어 있음.
   그렇다면 플로팅 버튼(휴지통 아이콘)을 말하는 것일 가능성 높음.
   
   플로팅 버튼 스타일을 확인해 보자. .upload-btn control-btn 클래스를 가짐.
   style.css 1300라인 근처? 
*/

.delete-page-btn {
    color: #ff8fab !important; /* 아이콘을 연분홍으로 */
    /* 만약 배경을 바꾸고 싶다면 아래 주석 해제 */
    /* background: #ff8fab !important; color: #fff !important; */
}

.delete-page-btn:hover {
    color: #ff5d8f !important;
}

/* ========== [NEW] Icon/Emoji Tabs (from Demo) ========== */
/* ========== [NEW] Icon/Emoji Tabs (from Demo) ========== */
.icon-category-tabs {
    display: flex;
    flex-wrap: wrap; /* 다 보여주기 */
    gap: 8px;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(0,0,0,0.1); /* 구분선도 어둡게 */
}

.icon-category-tabs::-webkit-scrollbar {
    display: none;
}

.icon-category-tab {
    padding: 6px 12px;
    font-size: 12px;
    border: none;
    background: #f5f5f5; /* 밝은 회색 배경 */
    color: #666; /* 어두운 글자 */
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.icon-category-tab:hover {
    background: #e5e5e5;
    color: #333;
}

.icon-category-tab.active {
    background: #333; /* 활성 상태는 진하게 */
    color: #fff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.icon-modal-option {
    aspect-ratio: 1;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 22px;
    color: #333; /* [FIX] 흰 배경에서 아이콘 보이도록 색상 변경 */
    transition: all 0.2s;
    background: rgba(0,0,0,0.05); /* 약간 어두운 배경 */
}

.icon-modal-option:hover {
    background: rgba(0,0,0,0.1);
    transform: scale(1.05);
    border-color: rgba(0,0,0,0.2);
}

.icon-modal-option:active {
    transform: scale(0.95);
}

.icon-modal-option .default-dot {
    width: 12px;
    height: 12px;
    background: #fff;
    border-radius: 50%;
}

.emoji-option .emoji-icon {
    font-size: 24px;
    line-height: 1;
}


/* ========== Emoji Bounce Animation ========== */
@keyframes emojiBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-4px); }
}

.emoji-tag {
    display: inline-block;
    animation: emojiBounce 2s ease-in-out infinite;
    /* 각 이모지마다 조금씩 다르게 움직이도록 딜레이 랜덤성 부여는 JS로 해야하지만,
       일단 CSS로 기본 바운스 적용 */
}

/* ========== [NEW] Drag Animation Styles (2025-12-12) ========== */
/* 드래그 중일 때: 살짝 커지고 그림자, 그리고 투명도 조절로 '들고 있는' 느낌 */
.hotspot.dragging {
    transform: translate(-50%, -50%) scale(1.2) !important;
    opacity: 0.8 !important;
    z-index: 1000 !important;
    box-shadow: 0 10px 20px rgba(0,0,0,0.3);
    cursor: grabbing;
    /* 바운스 애니메이션 잠시 중지 (드래그 중엔 정신 없으니까) */
    animation: none !important;
}

/* 드래그 끝나고 위치 잡을 때: 통통 튀는 애니메이션 (잠깐) */
@keyframes dropBounce {
    0% { transform: translate(-50%, -50%) scale(1.2); }
    40% { transform: translate(-50%, -50%) scale(0.9); }
    60% { transform: translate(-50%, -50%) scale(1.1); }
    80% { transform: translate(-50%, -50%) scale(0.95); }
    100% { transform: translate(-50%, -50%) scale(1); }
}

.hotspot.dropped {
    animation: dropBounce 0.4s ease-out !important;
}

/* ========== [NEW] Round Button Hover Effects (2025-12-12) ========== */
/* 상단/하단/플로팅 원형 버튼들에 호버 시 커지는 효과 적용 */
.control-btn, 
.social-btn, 
.liquid-close-btn,
#moveImageBtn, 
#uploadBtn, 
#deletePageBtn,
.fab-btn {
    transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s, box-shadow 0.2s !important;
}

.control-btn:hover, 
.social-btn:hover, 
.liquid-close-btn:hover,
#moveImageBtn:hover, 
#uploadBtn:hover, 
#deletePageBtn:hover,
.fab-btn:hover {
    transform: scale(1.15) !important; /* 확실하게 커지도록 1.15 */
    z-index: 1000; /* 호버 시 위로 */
}

/* 버튼 클릭 시 살짝 작아짐 (타격감) */
.control-btn:active, 
.social-btn:active, 
.liquid-close-btn:active,
#moveImageBtn:active, 
#uploadBtn:active, 
#deletePageBtn:active,
.fab-btn:active {
    transform: scale(0.95) !important;
}

/* ========== [NEW] Spinning TurnTable (2025-12-12) ========== */
@keyframes spin-slow {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.spin-slow {
    animation: spin-slow 4s linear infinite;
    display: inline-block; /* 회전하려면 inline-block 필요 */
}

/* 턴테이블 아이콘은 조금 더 크게 */
.hotspot i.fa-compact-disc,
.hotspot i.fa-record-vinyl {
    font-size: 32px !important;
    color: #fff !important;
    filter: drop-shadow(0 2px 5px rgba(0,0,0,0.5));
}

/* ========== [NEW] Realistic Vinyl Record Design (2025-12-12) ========== */
.vinyl-record {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    position: relative;
    background: 
        /* Center Hole */
        radial-gradient(circle at center, #f0f0f0 3px, transparent 3.5px),
        /* Red Label */
        radial-gradient(circle at center, #e74c3c 14px, #c0392b 15px, transparent 15.5px),
        /* Vinyl Body with Grooves */
        repeating-radial-gradient(#333 0, #333 2px, #1a1a1a 3px, #1a1a1a 4px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.5);
    border: 1px solid rgba(255,255,255,0.1);
    display: inline-block;
    pointer-events: none; /* [NEW] 클릭 불가능 (2025-12-13) */
}

/* Vinyl Reflection (Shininess) */
.vinyl-record::after {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    border-radius: 50%;
    background: conic-gradient(
        from 45deg, 
        transparent 0%, 
        rgba(255,255,255,0.15) 15%, 
        transparent 30%, 
        transparent 50%, 
        rgba(255,255,255,0.1) 65%, 
        transparent 80%
    );
    pointer-events: none;
    display: block;
}
