/* ==========================================
   피부 변화 다이어리 (연구 노트 스타일) & 위젯
   ========================================== */

/* 위젯 닫기 버튼 */
.widget-close-btn {
    position: absolute; top: 5px; right: 10px; background: none; border: none;
    color: #a4b0be; font-size: 16px; cursor: pointer; padding: 2px;
}
.widget-close-btn:hover { color: #ff4757; }
.skip-widget { padding: 25px 25px 20px 20px; /* 닫기 버튼 공간 확보 */ }


/* 전체 화면 오버레이 */
.diary-fullscreen-overlay {
    position: absolute; top: 70px; left: 0; width: 100%; height: calc(100vh - 70px);
    background: rgba(248, 250, 255, 0.8); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    display: flex; justify-content: center; align-items: flex-start; padding: 30px;
    box-sizing: border-box; z-index: 80; overflow-y: auto; animation: fadeIn 0.3s ease;
}

/* 노트 본체 */
.diary-notebook {
    background-color: #ffffff;
    background-image: linear-gradient(#f8f9fa 1px, transparent 1px), linear-gradient(90deg, #f8f9fa 1px, transparent 1px);
    background-size: 20px 20px; width: 100%; max-width: 1000px; border-radius: 20px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.08); border: 1px solid #dfe6e9;
    display: flex; flex-direction: column; overflow: hidden;
}

/* 노트 헤더 & 탭 */
.diary-header {
    background: white; padding: 20px 30px; border-bottom: 2px solid #eee;
    display: flex; justify-content: space-between; align-items: center; position: relative;
}
.diary-header h2 { margin: 0; font-size: 22px; color: #2d3436; font-weight: 800; display: flex; align-items: center; gap: 10px; }
.diary-header h2 span { color: var(--primary, #4a69bd); }

.diary-tabs { display: flex; gap: 10px; position: absolute; left: 50%; transform: translateX(-50%); }
.diary-tab {
    background: transparent; border: none; font-size: 14px; font-weight: bold; color: #a4b0be;
    padding: 10px 20px; cursor: pointer; transition: 0.2s; border-bottom: 3px solid transparent;
}
.diary-tab:hover { color: #2d3436; }
.diary-tab.active { color: var(--primary, #4a69bd); border-bottom: 3px solid var(--primary, #4a69bd); }

.btn-close-diary { background: none; border: none; font-size: 24px; color: #b2bec3; cursor: pointer; transition: 0.2s; }
.btn-close-diary:hover { color: #ff4757; transform: rotate(90deg); }

/* 노트 본문 */
.diary-body { display: flex; flex-wrap: wrap; padding: 30px; gap: 40px; }
.diary-left-page, .diary-right-page { flex: 1; min-width: 300px; display: flex; flex-direction: column; gap: 20px; }
.diary-section-title { font-size: 14px; font-weight: 700; color: #636e72; margin-bottom: 10px; border-bottom: 2px solid #eee; padding-bottom: 8px; }

/* 사진 업로드 영역 */
.photo-lab-box {
    width: 100%; height: 280px; background: rgba(255, 255, 255, 0.6); border: 2px dashed #b2bec3;
    border-radius: 16px; display: flex; flex-direction: column; align-items: center; justify-content: center;
    color: #a4b0be; font-size: 13px; font-weight: 600; cursor: pointer; transition: 0.2s;
}
.photo-lab-box:hover { border-color: var(--primary, #4a69bd); background: #f8faff; color: var(--primary, #4a69bd); }
.photo-lab-box span.icon { font-size: 40px; margin-bottom: 10px; }

/* 우측 슬라이더 */
.science-slider-group { background: white; padding: 20px; border-radius: 16px; border: 1px solid #eee; box-shadow: 0 4px 10px rgba(0,0,0,0.02); }
.slider-item { margin-bottom: 20px; }
.slider-item:last-child { margin-bottom: 0; }
.slider-label { display: flex; justify-content: space-between; font-size: 13px; font-weight: 700; color: #2d3436; margin-bottom: 8px; }
.slider-val { color: var(--primary, #4a69bd); font-weight: 900; }
.lab-range { -webkit-appearance: none; width: 100%; height: 6px; border-radius: 3px; background: #dfe6e9; outline: none; }
.lab-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; width: 20px; height: 20px; border-radius: 50%; background: var(--primary, #4a69bd); cursor: pointer; box-shadow: 0 2px 5px rgba(0,0,0,0.2); transition: 0.2s; }
.lab-range::-webkit-slider-thumb:hover { transform: scale(1.2); }

/* 저장 버튼 */
.btn-save-lab {
    background: var(--primary, #4a69bd); color: white; border: none; padding: 18px; border-radius: 14px;
    font-size: 16px; font-weight: bold; cursor: pointer; transition: 0.2s; margin-top: 10px; width: 100%;
    box-shadow: 0 8px 20px rgba(74, 105, 189, 0.3);
}
.btn-save-lab:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(74, 105, 189, 0.4); }

/* 통계 화면 스타일 */
.stats-container { display: flex; flex-direction: column; gap: 20px; background: white; padding: 20px; border-radius: 16px; border: 1px solid #eee; }
.stat-box h5 { margin: 0 0 10px 0; font-size: 14px; color: #2d3436; }
.stat-bar-bg { width: 100%; background: #f1f2f6; height: 24px; border-radius: 12px; overflow: hidden; margin-bottom: 8px; }
.stat-bar { height: 100%; display: flex; align-items: center; padding-left: 10px; color: white; font-size: 11px; font-weight: bold; font-family: sans-serif;}
.stat-box p { margin: 0; font-size: 12px; color: #636e72; text-align: right; }
.stat-box p span { font-weight: bold; color: #2d3436; }

@media (max-width: 768px) {
    .diary-header { flex-direction: column; gap: 15px; }
    .diary-tabs { position: static; transform: none; }
    .diary-body { flex-direction: column; gap: 20px; padding: 20px; }
}