hfexample's picture
Deploy clean snapshot of the repository
e221c83
/* --- ๐Ÿ›ธ ๋งค์ง ์บก์А ๋‚ด๋น„๊ฒŒ์ด์…˜ ๋ฐ” (Magic Capsule Navbar) --- */
.navbar-container {
position: fixed;
top: 20px;
left: 0;
width: 100%;
display: flex;
justify-content: center;
z-index: 1000;
}
.navbar {
display: flex;
align-items: center;
gap: 30px;
padding: 8px 15px;
border-radius: 50px; /* ๋‘ฅ๊ทผ ์บก์А ๋ชจ์–‘ */
/* ๊ธ€๋ž˜์Šค๋ชจํ”ผ์ฆ˜ (์œ ๋ฆฌ ํšจ๊ณผ) */
background: rgba(255, 255, 255, 0.7);
backdrop-filter: blur(15px);
-webkit-backdrop-filter: blur(15px);
box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
border: 1px solid rgba(255, 255, 255, 0.8);
}
.navbar-brand {
font-weight: 800;
font-size: 1.1rem;
color: var(--primary-color);
text-decoration: none;
padding: 0 15px;
letter-spacing: -0.5px;
}
/* ๋ฉ”๋‰ด ๋ฆฌ์ŠคํŠธ */
.navbar-menu {
position: relative; /* ๋งˆ์ปค์˜ ๊ธฐ์ค€์  */
display: flex;
flex-direction: row; /* Added */
align-items: center; /* Added */
list-style: none;
margin: 0;
padding: 5px;
background: rgba(0,0,0,0.03); /* ๋ฉ”๋‰ด ๋’ค ์—ฐํ•œ ํŠธ๋ž™ */
border-radius: 30px;
}
.nav-item {
position: relative;
z-index: 2; /* ๋งˆ์ปค๋ณด๋‹ค ์œ„์— ์œ„์น˜ */
}
.nav-item a {
display: block;
padding: 8px 20px;
text-decoration: none;
color: #666;
font-weight: 600;
font-size: 0.9rem;
border-radius: 30px;
transition: color 0.3s;
}
/* ๋งˆ์šฐ์Šค ์˜ฌ๋ ธ์„ ๋•Œ ๊ธ€์ž์ƒ‰ ๋ณ€๊ฒฝ */
.nav-item a:hover {
color: var(--primary-color);
}
/* โœจ ์›€์ง์ด๋Š” ํ•˜์ด๋ผ์ดํŠธ (Marker) */
.nav-marker {
position: absolute;
top: 5px;
left: 5px;
width: 0; /* JS๋กœ ์ œ์–ด */
height: calc(100% - 10px);
background: white;
border-radius: 25px;
box-shadow: 0 2px 5px rgba(0,0,0,0.05);
transition: all 0.3s cubic-bezier(0.5, 0, 0, 1); /* ๋ถ€๋“œ๋Ÿฌ์šด ์ด๋™ */
z-index: 1;
opacity: 0; /* ์ฒ˜์Œ์—” ์ˆจ๊น€ */
}
.copyright-dropdown {
position: relative;
margin-left: 1rem;
}
.copyright-toggle {
cursor: pointer;
font-size: 0.9rem;
color: var(--light-text-color);
border: 1px solid #ddd;
padding: 4px 8px;
border-radius: 6px;
transition: background-color 0.2s;
}
.copyright-toggle:hover {
background-color: #f5f5f5;
}
.copyright-content {
display: none;
position: absolute;
top: 120%;
left: 0;
background-color: white;
border-radius: 8px;
box-shadow: 0 4px 12px rgba(0,0,0,0.1);
padding: 1rem;
z-index: 1001; /* Onboarding is 1000 */
width: 220px;
border: 1px solid #eee;
opacity: 0;
transform: translateY(-10px);
transition: opacity 0.2s, transform 0.2s;
pointer-events: none;
}
.copyright-content p {
margin: 0.5rem 0;
font-size: 0.85rem;
color: #555;
}
.copyright-content p:first-child {
margin-top: 0;
}
.copyright-content p:last-child {
margin-bottom: 0;
}
.copyright-dropdown:hover .copyright-content {
display: block;
opacity: 1;
transform: translateY(0);
pointer-events: auto;
}
/* --- ๋ฉ”์ธ ์ฝ˜ํ…์ธ  ์Šคํƒ€์ผ --- */
/* --- ๐Ÿ“– ํŽผ์ณ์ง„ ๋‹ค์ด์–ด๋ฆฌ ์Šคํƒ€์ผ (Book Spread Design) --- */
/* 1. ๋ฉ”์ธ ๋ ˆ์ด์•„์›ƒ */
.main-content {
display: flex;
justify-content: center;
align-items: center;
min-height: 80vh; /* ํ™”๋ฉด ์ค‘์•™ ์ •๋ ฌ */
margin-top: 1.5rem;
padding: 10px;
}
/* 2. ๋‹ค์ด์–ด๋ฆฌ ์ „์ฒด ํ”„๋ ˆ์ž„ */
/* --- 1. ๋‹ค์ด์–ด๋ฆฌ ํฌ๊ธฐ ํ™•๋Œ€ (Big Size) --- */
.diary-book {
display: flex;
width: 70vw; /* ํ™”๋ฉด ๋„ˆ๋น„์˜ 70%๊นŒ์ง€ ์‚ฌ์šฉ */
max-width: 1600px; /* ์ตœ๋Œ€ ๋„ˆ๋น„ 1600px */
min-width: 1200px; /* ์ตœ์†Œ ๋„ˆ๋น„ 1200px ๊ฐ•์ œ */
height: 750px; /* ๋†’์ด ๊ณ ์ • */
margin-top: 5rem;
background-color: #fdfbf7;
border-radius: 20px;
box-shadow: 0 30px 60px rgba(0,0,0,0.15), 0 0 0 12px #5d4037;
overflow: hidden;
position: relative;
margin: 0 auto; /* ์ˆ˜ํ‰ ์ค‘์•™ ์ •๋ ฌ */
}
/* --- 2. ํŽ˜์ด์ง€ ๋‚ด๋ถ€ ์Šคํฌ๋กค ์ถ”๊ฐ€ (์ž˜๋ฆผ ๋ฐฉ์ง€) --- */
.book-page {
flex: 1;
/* ํŒจ๋”ฉ์„ ์กฐ๊ธˆ ๋” ๋Š˜๋ ค์„œ ์‹œ์›ํ•˜๊ฒŒ (40px -> 60px) */
padding: 40px 50px;
display: flex;
flex-direction: column;
position: relative;
background-image: linear-gradient(to right, rgba(0,0,0,0.02) 0%, rgba(0,0,0,0) 5%);
/* ์Šคํฌ๋กค๋ฐ” ์ˆจ๊น€ ์œ ์ง€ */
overflow-y: auto;
scrollbar-width: none;
-ms-overflow-style: none;
min-width:0;
}
/* (์„ ํƒ) ์Šคํฌ๋กค๋ฐ”๋ฅผ ์˜ˆ์˜๊ฒŒ ๊พธ๋ฏธ๊ธฐ */
.book-page::-webkit-scrollbar {
display: none;
}
.book-page::-webkit-scrollbar-track {
background: transparent;
}
.book-page::-webkit-scrollbar-thumb {
background-color: #e0e0e0;
border-radius: 4px;
}
.book-page::-webkit-scrollbar-thumb:hover {
background-color: #ccc;
}
.page-header {
margin-bottom: 0.5rem;
}
/* --- 3. ์ž…๋ ฅ์ฐฝ ํฌ๊ธฐ ๋Œ€์‘ --- */
textarea {
flex-grow: 1;
border: none;
background: transparent;
font-size: 1.1rem;
/* [์ˆ˜์ •] ์ค„ ๋†’์ด์™€ ๋ฐฐ๊ฒฝ ํŒจํ„ด ๊ฐ„๊ฒฉ์„ ์ค„์—ฌ์„œ ๋” ๋งŽ์ด ์“ฐ๊ฒŒ ํ•จ */
line-height: 2rem; /* ์ค„ ๊ฐ„๊ฒฉ (๊ธฐ์กด ์œ ์ง€ํ•˜๊ฑฐ๋‚˜ 1.8rem์œผ๋กœ ์ค„์—ฌ๋„ ๋จ) */
resize: none;
outline: none;
/* ๋ฐฐ๊ฒฝ ์ค„๋ฌด๋Šฌ ๊ฐ„๊ฒฉ๋„ line-height์™€ ๋˜‘๊ฐ™์ด ๋งž์ถฐ์•ผ ํ•จ */
background-image: linear-gradient(transparent 95%, #e0e0e0 95%);
background-size: 100% 2rem; /* 2rem ๊ฐ„๊ฒฉ */
padding: 0 10px; /* ์ขŒ์šฐ ์—ฌ๋ฐฑ */
font-family: inherit;
/* ์Šคํฌ๋กค๋ฐ” ์ˆจ๊น€ */
scrollbar-width: none;
}
/* 9. ์˜ค๋ฅธ์ชฝ ๋นˆ ํ™”๋ฉด ์ƒํƒœ */
.empty-state {
display: flex;
justify-content: center;
align-items: center;
height: 100%;
color: #aaa;
text-align: center;
font-size: 0.95rem;
}
/* --- ๊ธฐ์กด ๊ธฐ๋Šฅ ํ˜ธํ™˜์„ฑ ์œ ์ง€ --- */
/* ์ฐข์–ด์ง€๋Š” ์• ๋‹ˆ๋ฉ”์ด์…˜์šฉ ํด๋ž˜์Šค ์žฌ์กฐ์ • */
#submit-btn {
width: 100%;
background-color: var(--primary-color);
color: white;
padding: 14px;
border-radius: 8px;
border: none;
font-size: 18px;
font-weight: bold;
cursor: pointer;
transition: background-color 0.2s;
}
#submit-btn:hover {
background-color: var(--primary-hover-color);
}
#submit-btn:disabled {
background-color: #cccccc;
cursor: not-allowed;
}
#result {
background: #ffffff;
border-radius: 15px; /* ๋‘ฅ๊ธ€๊ฒŒ */
padding: 25px; /* ๋‚ด๋ถ€ ์—ฌ๋ฐฑ ๋„‰๋„‰ํ•˜๊ฒŒ */
margin-top: 15px; /* ํ—ค๋”("AI์˜ ๋‹ต์žฅ")์™€ ๊ฐ„๊ฒฉ ๋„์šฐ๊ธฐ */
/* ๊ทธ๋ฆผ์ž + ํ…Œ๋‘๋ฆฌ๋กœ ์นด๋“œ ๋А๋‚Œ ๋‚ด๊ธฐ */
box-shadow: 0 4px 15px rgba(0,0,0,0.05);
border: 1px solid #eee;
font-size: 1rem;
color: #444;
line-height: 1.7;
width:100%;
box-sizing: border-box;
}
.rec-tabs {
display: flex;
margin-top: 1.5rem;
margin-bottom: 1rem;
border-bottom: 1px solid #ddd;
}
.rec-tab-btn {
padding: 10px 15px;
cursor: pointer;
border: none;
background-color: transparent;
font-size: 1rem;
color: var(--light-text-color);
border-bottom: 2px solid transparent;
margin-bottom: -1px;
}
.rec-tab-btn.active {
color: var(--primary-color);
border-bottom-color: var(--primary-color);
font-weight: 600;
}
.rec-content {
display: none;
}
.rec-content.active {
display: block;
}
/* --- ์˜จ๋ณด๋”ฉ ์Šฌ๋ผ์ด๋“œ ์Šคํƒ€์ผ --- */
.onboarding-overlay {
position: fixed;
top: 0;
left: 0;
width: 100%;
height: 100%;
background-color: rgba(0, 0, 0, 0.6);
display: flex;
justify-content: center;
align-items: center;
z-index: 1000;
opacity: 0;
visibility: hidden;
transition: opacity 0.3s, visibility 0.3s;
}
.onboarding-overlay.active {
opacity: 1;
visibility: visible;
}
.onboarding-modal {
background-color: white;
padding: 30px 40px;
border-radius: 15px;
width: 90%;
max-width: 500px;
box-shadow: 0 5px 20px rgba(0,0,0,0.2);
transform: scale(0.9);
transition: transform 0.3s;
}
.onboarding-overlay.active .onboarding-modal {
transform: scale(1);
}
.onboarding-slide {
display: none;
text-align: center;
}
.onboarding-slide.active {
display: block;
}
.onboarding-slide h2 {
color: var(--primary-color);
margin-bottom: 15px;
}
.onboarding-slide p {
font-size: 1rem;
color: var(--light-text-color);
line-height: 1.6;
}
.onboarding-nav {
display: flex;
justify-content: space-between;
align-items: center;
margin-top: 25px;
}
.onboarding-dots {
display: flex;
gap: 8px;
}
.onboarding-dot {
width: 10px;
height: 10px;
background-color: #ccc;
border-radius: 50%;
cursor: pointer;
}
.onboarding-dot.active {
background-color: var(--primary-color);
}
.onboarding-btn {
background-color: var(--primary-color);
color: white;
border: none;
padding: 10px 20px;
border-radius: 5px;
cursor: pointer;
font-weight: 500;
}
.onboarding-btn:hover {
background-color: var(--primary-hover-color);
}
#onboarding-close {
background-color: transparent;
color: var(--light-text-color);
}
/* --- ํ…Œ๋งˆ ํŒ”๋ ˆํŠธ ์Šคํƒ€์ผ --- */
.theme-palette {
position: fixed;
bottom: 20px;
right: 20px;
display: flex;
flex-direction: column;
gap: 10px;
z-index: 100;
}
.theme-btn {
width: 50px;
height: 50px;
border-radius: 50%;
border: 2px solid white;
cursor: pointer;
font-size: 24px;
display: flex;
justify-content: center;
align-items: center;
box-shadow: 0 2px 10px rgba(0,0,0,0.2);
transition: transform 0.2s;
}
.theme-btn:hover {
transform: scale(1.1);
}
.theme-option-wrapper {
position: relative;
display: flex;
justify-content: flex-end;
}
.sub-options {
display: none;
position: absolute;
right: 60px; /* theme-btn width + gap */
top: 50%;
transform: translateY(-50%);
align-items: center;
gap: 10px;
background-color: rgba(255, 255, 255, 0.8);
padding: 8px;
border-radius: 10px;
backdrop-filter: blur(4px);
box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.theme-option-wrapper.active .sub-options {
display: flex;
}
.sub-options img, .sub-option-btn {
width: 40px;
height: 40px;
border-radius: 6px;
cursor: pointer;
border: 1px solid rgba(0,0,0,0.05);
box-shadow: 0 1px 4px rgba(0,0,0,0.1);
object-fit: cover;
}
.sub-option-btn {
background-color: white;
font-size: 12px;
padding: 0;
}
.rec-btn {
background-color: #f0f0f0;
border: 1px solid #ddd;
padding: 8px 12px;
border-radius: 6px;
cursor: pointer;
margin-right: 10px;
font-size: 14px;
}
.rec-btn.active {
background-color: var(--primary-color);
color: white;
border-color: var(--primary-color);
}
#result table {
width: 100%; /* ๋ถ€๋ชจ ๋ฐ•์Šค ๋„ˆ๋น„์— ๋”ฑ ๋งž์ถค */
table-layout: fixed; /* [ํ•ต์‹ฌ] ๋‚ด์šฉ์ด ๊ธธ์–ด๋„ ํ…Œ์ด๋ธ”์ด ๋Š˜์–ด๋‚˜์ง€ ์•Š๊ฒŒ ๊ณ ์ • */
border-collapse: collapse;
margin-top: 15px;
font-size: 0.95rem;
background-color: #fafafa; /* ํ‘œ ๋ฐฐ๊ฒฝ์ƒ‰ */
border-radius: 8px;
overflow: hidden; /* ๋‘ฅ๊ทผ ๋ชจ์„œ๋ฆฌ ์ ์šฉ */
}
#result th, #result td {
padding: 12px 15px;
border-bottom: 1px solid #eee;
word-break: keep-all; /* ํ•œ๊ธ€ ๋‹จ์–ด ์•ˆ ๋Š๊ธฐ๊ฒŒ */
vertical-align: middle; /* ์„ธ๋กœ ์ค‘์•™ ์ •๋ ฌ */
}
/* ์ฒซ ๋ฒˆ์งธ ์นธ(์ข…๋ฅ˜) ๋„ˆ๋น„ ์ค„์ด๊ธฐ */
#result th:first-child, #result td:first-child {
width: 60px; /* '์ข…๋ฅ˜' ์นธ์€ ์ข๊ฒŒ */
text-align: center;
font-weight: bold;
color: var(--primary-color);
background-color: #f0f5ff; /* ํ—ค๋” ๋ฐฐ๊ฒฝ์ƒ‰ */
}
/* ๋‘ ๋ฒˆ์งธ ์นธ(์ถ”์ฒœ ๋‚ด์šฉ) */
#result td:last-child {
text-align: left;
font-size: 0.9rem;
color: #555;
/* [ํ•ต์‹ฌ] 2์ค„ ๋„˜์–ด๊ฐ€๋ฉด ... ์ฒ˜๋ฆฌ */
display: -webkit-box;
-webkit-line-clamp: 2;
line-clamp: 2;
-webkit-box-orient: vertical;
overflow: hidden;
text-overflow: ellipsis;
/* ๋ถ€๋“œ๋Ÿฌ์šด ์ „ํ™˜ */
transition: all 0.3s ease;
cursor: help; /* ๋งˆ์šฐ์Šค ์˜ฌ๋ฆฌ๋ฉด ๋ฌผ์Œํ‘œ ์ปค์„œ */
}
#result td:last-child:hover {
-webkit-line-clamp: unset; /* ์ค„ ์ œํ•œ ํ•ด์ œ */
line-clamp: unset;
background-color: #fff; /* ์ฝ๊ธฐ ํŽธํ•˜๊ฒŒ ๋ฐฐ๊ฒฝ ๋ฐ๊ฒŒ */
color: #000;
z-index: 10;
box-shadow: 0 2px 10px rgba(0,0,0,0.1); /* ์‚ด์ง ๋„์šฐ๊ธฐ */
border-radius: 5px;
position: relative; /* ์œ„๋กœ ๋œจ๊ฒŒ ํ•˜๊ธฐ ์œ„ํ•ด */
}
/* --- ๊ฐ์ • ์„ ํƒ UI ์Šคํƒ€์ผ --- */
#emotion-choice-container {
background-color: #f0f8ff;
border-radius: 8px;
padding: 20px;
margin-top: 20px;
border: 1px solid #bde0fe;
}
#emotion-chips {
display: flex;
justify-content: center;
gap: 15px;
flex-wrap: wrap;
}
.emotion-chip {
display: flex;
align-items: center;
background-color: #f0f0f0;
border: 1px solid #ddd;
border-radius: 20px; /* ์บก์А ๋ชจ์–‘ */
padding: 8px 16px;
font-size: 1rem;
cursor: pointer;
transition: background-color 0.2s, border-color 0.2s, transform 0.1s;
user-select: none;
}
.emotion-chip:hover {
background-color: #e0e0e0;
transform: translateY(-2px);
}
.emotion-chip.active {
background-color: var(--primary-color);
color: white;
border-color: var(--primary-hover-color);
font-weight: bold;
}
.score-badge {
margin-left: 8px;
background-color: rgba(0, 0, 0, 0.1);
color: #333;
padding: 3px 6px;
font-size: 0.75rem;
font-weight: bold;
border-radius: 8px;
}
.emotion-chip.active .score-badge {
background-color: rgba(255, 255, 255, 0.2);
color: white;
}
/* --- ์ผ๊ธฐ ์ €์žฅํ•˜๊ธฐ ๋ฒ„ํŠผ ์œ„์น˜ ์กฐ์ • --- */
#save-action-container {
/* ๋ฒ„ํŠผ์ด ์˜ค๋ฅธ์ชฝ ์ •๋ ฌ๋˜๋„๋ก */
display: flex;
justify-content: flex-end;
margin:0;
}
.save-btn {
/* ๋ฒ„ํŠผ ๋””์ž์ธ ์กฐ๊ธˆ ๋” ์˜ˆ์˜๊ฒŒ */
background-color: var(--primary-color);
color: white;
padding: 10px 20px;
border-radius: 50px;
border: none;
font-weight: bold;
box-shadow: 0 4px 10px rgba(101, 152, 229, 0.4);
transition: transform 0.2s;
}
.save-btn:hover {
transform: translateY(-2px);
}
/* --- ๊ฒฐ๊ณผ ํ‘œ์‹œ ํ—ค๋” --- */
.result-header {
display: flex;
justify-content: space-between;
align-items: flex-start; /* Align to the top */
margin-bottom: 1rem;
padding-bottom: 1rem;
border-bottom: 1px solid #eee;
}
.result-title p {
margin: 0;
}
/* Make the save button container part of the flex layout */
.result-header .save-button-container {
margin-top: 0;
}
/* --- ๋กœ๋”ฉ ํ”„๋กœ๊ทธ๋ ˆ์Šค ๋ฐ” --- */
.progress-bar-container {
width: 100%;
background-color: #e0e0e0;
border-radius: 4px;
margin: 20px 0;
overflow: hidden; /* Ensures the inner bar stays within the rounded corners */
}
.progress-bar {
width: 0%;
height: 10px;
background-color: var(--primary-color);
border-radius: 4px;
transition: width 0.2s ease-in-out;
}
.loading-text {
text-align: center;
margin-top: 10px;
color: #555;
font-size: 0.9rem;
}