/* 글마루 - 따뜻한 감성 스타일 */

/* 색상 변수 */
:root {
    --primary: #8B7355;
    --primary-light: #A68B6A;
    --primary-dark: #6B5344;
    --secondary: #D4C4B0;
    --accent: #E8B4A0;
    --background: #FDF8F3;
    --surface: #FFFFFF;
    --text: #4A4A4A;
    --text-light: #7A7A7A;
    --text-muted: #A0A0A0;
    --border: #E8E0D8;
    --success: #7CB798;
    --danger: #D88A8A;
    --shadow: rgba(139, 115, 85, 0.1);
}

/* 기본 스타일 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Noto Serif KR', Georgia, serif;
    background: var(--background);
    color: var(--text);
    line-height: 1.8;
    min-height: 100vh;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* 헤더 */
.header {
    text-align: center;
    padding: 40px 20px;
    margin-bottom: 30px;
}

.header-minimal {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    text-align: left;
}

.header-minimal h1 {
    font-size: 1.3rem;
}

.logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-bottom: 10px;
}

.logo-icon {
    font-size: 2.5rem;
}

.logo h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 2px;
}

.tagline {
    color: var(--text-light);
    font-size: 1rem;
    font-style: italic;
}

.back-link {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
}

.back-link:hover {
    text-decoration: underline;
}

/* 메인 콘텐츠 */
.main-content {
    flex: 1;
}

/* 환영 섹션 */
.welcome-section {
    text-align: center;
    margin-bottom: 30px;
}

.welcome-message {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 15px;
}

.streak-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: linear-gradient(135deg, #FFE4C4, #FFF8DC);
    padding: 10px 20px;
    border-radius: 30px;
    font-size: 0.95rem;
    box-shadow: 0 2px 10px var(--shadow);
}

.streak-icon {
    font-size: 1.2rem;
}

.streak-count {
    font-weight: 700;
    color: var(--primary);
}

/* 액션 카드 */
.action-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.action-card {
    background: var(--surface);
    border-radius: 16px;
    padding: 30px 20px;
    text-align: center;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 4px 20px var(--shadow);
    transition: all 0.3s ease;
    border: 1px solid var(--border);
}

.action-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px var(--shadow);
}

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.action-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
    color: var(--primary);
}

.action-card p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.write-card:hover { border-color: var(--primary); }
.list-card:hover { border-color: var(--accent); }
.report-card:hover { border-color: var(--success); }

/* 통계 미리보기 */
.stats-preview {
    background: var(--surface);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px var(--shadow);
}

.stats-preview h3 {
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 20px;
    text-align: center;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.stat-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* 마일스톤 알림 */
.milestone-alert {
    display: flex;
    align-items: center;
    gap: 15px;
    background: linear-gradient(135deg, #FFF8DC, #FFE4C4);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 30px;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(139, 115, 85, 0.2); }
    50% { box-shadow: 0 0 0 10px rgba(139, 115, 85, 0); }
}

.milestone-icon {
    font-size: 2.5rem;
}

.milestone-text {
    flex: 1;
}

.milestone-text strong {
    display: block;
    color: var(--primary);
}

.milestone-btn {
    background: var(--primary);
    color: white;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
}

/* 인트로 섹션 (비로그인) */
.intro-section {
    text-align: center;
}

.intro-image {
    margin-bottom: 30px;
}

.book-illustration {
    font-size: 4rem;
    display: flex;
    justify-content: center;
    gap: 20px;
}

.intro-text {
    margin-bottom: 40px;
}

.intro-text h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 15px;
}

.intro-text p {
    color: var(--text-light);
    line-height: 2;
}

.features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
}

.feature {
    background: var(--surface);
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 10px var(--shadow);
}

.feature-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
}

.feature h4 {
    font-size: 1rem;
    color: var(--primary);
    margin-bottom: 8px;
}

.feature p {
    font-size: 0.85rem;
    color: var(--text-light);
}

.cta-section {
    display: flex;
    gap: 15px;
    justify-content: center;
}

/* 버튼 */
.btn {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 500;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
}

.btn-secondary {
    background: var(--secondary);
    color: var(--text);
}

.btn-secondary:hover {
    background: #C4B4A0;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-large {
    padding: 15px 40px;
    font-size: 1.1rem;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.85rem;
}

/* 폼 스타일 */
.write-form {
    background: var(--surface);
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px var(--shadow);
}

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

.form-label {
    display: block;
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text);
    margin-bottom: 10px;
}

.required {
    color: var(--danger);
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    color: var(--text);
    background: var(--background);
    transition: border-color 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.8;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.char-count {
    text-align: right;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 5px;
}

/* 소스 타입 선택 */
.source-types {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
}

.source-type {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 15px 10px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.source-type:hover {
    border-color: var(--primary-light);
}

.source-type input {
    display: none;
}

.source-type input:checked + .source-icon {
    transform: scale(1.1);
}

.source-type:has(input:checked) {
    border-color: var(--primary);
    background: rgba(139, 115, 85, 0.05);
}

.source-icon {
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.source-name {
    font-size: 0.85rem;
    color: var(--text-light);
}

/* 기분 선택 */
.mood-selector {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.mood-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    padding: 12px 15px;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s;
}

.mood-option:hover {
    border-color: var(--accent);
}

.mood-option input {
    display: none;
}

.mood-option:has(input:checked) {
    border-color: var(--accent);
    background: rgba(232, 180, 160, 0.1);
}

.mood-emoji {
    font-size: 1.5rem;
}

.mood-name {
    font-size: 0.8rem;
    color: var(--text-light);
}

.form-actions {
    text-align: center;
    padding-top: 20px;
}

/* 모달 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: var(--surface);
    border-radius: 16px;
    padding: 40px;
    max-width: 500px;
    width: 100%;
    text-align: center;
    position: relative;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-large {
    max-width: 700px;
}

.modal-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: 20px;
}

.modal-icon.success {
    color: var(--success);
}

.modal-content h3 {
    font-size: 1.3rem;
    margin-bottom: 15px;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 25px;
}

.milestone-notice {
    background: linear-gradient(135deg, #FFF8DC, #FFE4C4);
    border-radius: 12px;
    padding: 20px;
    margin: 20px 0;
}

.milestone-badge {
    font-size: 2rem;
}

/* 글 목록 */
.filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}

.filter-group {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}

.filter-select {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    font-family: inherit;
    font-size: 0.9rem;
    color: var(--text);
    cursor: pointer;
}

.filter-checkbox {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 0.9rem;
    cursor: pointer;
}

.search-input {
    padding: 10px 15px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: var(--surface);
    font-family: inherit;
    font-size: 0.9rem;
    width: 200px;
}

.writings-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.writing-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 2px 10px var(--shadow);
    cursor: pointer;
    transition: all 0.3s;
    border: 1px solid transparent;
}

.writing-card:hover {
    border-color: var(--primary-light);
    transform: translateY(-2px);
}

.writing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.writing-type {
    font-size: 0.85rem;
    color: var(--primary);
}

.writing-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.writing-mood {
    font-size: 1.2rem;
}

.favorite-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.3s;
}

.favorite-btn:hover,
.favorite-btn.active {
    opacity: 1;
}

.writing-source {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 10px;
    font-style: italic;
}

.writing-content {
    font-size: 1rem;
    line-height: 1.8;
    margin-bottom: 10px;
}

.writing-reflection {
    font-size: 0.9rem;
    color: var(--text-light);
    padding-left: 15px;
    border-left: 3px solid var(--secondary);
    margin-bottom: 10px;
}

.writing-date {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* 페이지네이션 */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 30px;
}

.pagination button {
    padding: 8px 14px;
    border: 1px solid var(--border);
    background: var(--surface);
    border-radius: 6px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.3s;
}

.pagination button:hover {
    border-color: var(--primary);
}

.pagination button.active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* 빈 상태 */
.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-icon {
    font-size: 4rem;
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 1.2rem;
    color: var(--text);
    margin-bottom: 10px;
}

.empty-state p {
    color: var(--text-light);
    margin-bottom: 20px;
}

/* 상세 보기 */
.writing-detail {
    text-align: left;
}

.detail-header {
    display: flex;
    gap: 15px;
    align-items: center;
    margin-bottom: 15px;
}

.detail-type {
    font-size: 0.9rem;
    color: var(--primary);
    background: rgba(139, 115, 85, 0.1);
    padding: 5px 12px;
    border-radius: 20px;
}

.detail-mood {
    font-size: 1.5rem;
}

.detail-source {
    font-style: italic;
    color: var(--text-light);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--border);
}

.detail-content {
    font-size: 1.1rem;
    line-height: 2;
    margin-bottom: 25px;
    white-space: pre-wrap;
}

.detail-reflection {
    background: var(--background);
    border-radius: 12px;
    padding: 20px;
    margin-bottom: 25px;
}

.detail-reflection h4 {
    font-size: 0.9rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.detail-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border-top: 1px solid var(--border);
}

.detail-date {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.detail-actions {
    display: flex;
    gap: 10px;
}

/* 리포트 페이지 */
.milestone-progress {
    background: var(--surface);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 15px var(--shadow);
}

.milestone-progress h3 {
    text-align: center;
    font-size: 1rem;
    color: var(--text-light);
    margin-bottom: 20px;
}

.progress-bar-container {
    height: 8px;
    background: var(--border);
    border-radius: 4px;
    margin-bottom: 20px;
    position: relative;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    border-radius: 4px;
    transition: width 0.5s ease;
}

.milestones-track {
    position: relative;
    height: 30px;
    margin-bottom: 15px;
}

.milestone-marker {
    position: absolute;
    transform: translateX(-50%);
    text-align: center;
}

.marker-value {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.milestone-marker.achieved .marker-value {
    color: var(--primary);
    font-weight: 600;
}

.marker-check {
    color: var(--success);
    font-size: 0.7rem;
    display: block;
}

.progress-text {
    text-align: center;
    font-size: 0.95rem;
    color: var(--text-light);
}

.generate-section {
    margin-bottom: 40px;
}

.generate-card {
    background: linear-gradient(135deg, #FFF8DC, #FFE4C4);
    border-radius: 16px;
    padding: 30px;
    text-align: center;
}

.generate-icon {
    font-size: 3rem;
    margin-bottom: 15px;
}

.generate-card h3 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 10px;
}

.milestone-select {
    margin: 15px 0;
    padding: 12px 20px;
    border: 1px solid var(--primary-light);
    border-radius: 8px;
    background: white;
    font-size: 1rem;
    font-family: inherit;
}

.reports-section h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 20px;
}

.reports-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.report-card {
    display: flex;
    align-items: center;
    gap: 20px;
    background: var(--surface);
    border-radius: 12px;
    padding: 20px;
    text-decoration: none;
    color: var(--text);
    box-shadow: 0 2px 10px var(--shadow);
    transition: all 0.3s;
}

.report-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 20px var(--shadow);
}

.report-badge {
    width: 50px;
    height: 50px;
    background: var(--primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.2rem;
}

.report-info {
    flex: 1;
}

.report-info h4 {
    font-size: 1rem;
    margin-bottom: 5px;
}

.report-date {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.report-preview {
    font-size: 0.9rem;
    color: var(--text-light);
}

.report-arrow {
    font-size: 1.5rem;
    color: var(--text-muted);
}

/* 리포트 상세 */
.report-header {
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border);
}

.report-badge-large {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    font-weight: 700;
}

.report-title h2 {
    font-size: 1.4rem;
    color: var(--primary);
    margin-bottom: 5px;
}

.report-meta {
    font-size: 0.9rem;
    color: var(--text-muted);
}

.report-stats {
    background: var(--surface);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px var(--shadow);
}

.report-stats h3 {
    font-size: 1rem;
    margin-bottom: 20px;
}

.stats-cards {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--background);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
}

.stat-card .stat-label {
    display: block;
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.stat-card .stat-value {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text);
}

.distribution-chart h4 {
    font-size: 0.9rem;
    color: var(--text-light);
    margin-bottom: 15px;
}

.chart-bars {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chart-bar {
    display: flex;
    align-items: center;
    gap: 10px;
}

.bar-label {
    width: 80px;
    font-size: 0.85rem;
}

.bar-container {
    flex: 1;
    height: 20px;
    background: var(--border);
    border-radius: 10px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 10px;
    transition: width 0.5s ease;
}

.bar-count {
    width: 30px;
    font-size: 0.85rem;
    text-align: right;
    color: var(--text-muted);
}

.report-section {
    background: var(--surface);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px var(--shadow);
}

.report-section h3 {
    font-size: 1.1rem;
    color: var(--primary);
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
}

.report-content {
    font-size: 1rem;
    line-height: 2;
    color: var(--text);
}

.report-section.recommendations {
    background: linear-gradient(135deg, rgba(255, 248, 220, 0.5), rgba(255, 228, 196, 0.3));
}

.report-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 40px;
    margin-bottom: 30px;
}

/* 로딩 상태 */
.loading {
    text-align: center;
    padding: 40px;
    color: var(--text-muted);
}

.error {
    text-align: center;
    padding: 40px;
    color: var(--danger);
}

/* 푸터 */
.footer {
    text-align: center;
    padding: 30px 20px;
    margin-top: auto;
    color: var(--text-muted);
    font-size: 0.85rem;
}

.footer-nav {
    display: flex;
    gap: 20px;
    justify-content: center;
    margin-top: 10px;
}

.footer-nav a {
    color: var(--text-light);
    text-decoration: none;
}

.footer-nav a:hover {
    color: var(--primary);
}

/* ============ 오늘의 명언 ============ */

.daily-quote-card {
    background: linear-gradient(135deg, #FFF8F0, #FDF5E6);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    text-align: center;
    border: 1px solid var(--border);
}

.quote-icon {
    font-size: 2rem;
    margin-bottom: 10px;
}

.quote-text {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text);
    line-height: 1.8;
    margin-bottom: 10px;
}

.quote-author {
    font-size: 0.9rem;
    color: var(--text-light);
}

.daily-quote-card.mini {
    padding: 15px 20px;
    margin-bottom: 20px;
}

.daily-quote-card.mini .quote-text {
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.daily-quote-card.mini .quote-author {
    font-size: 0.8rem;
}

/* ============ 월간 목표 ============ */

.goal-section {
    background: var(--surface);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px var(--shadow);
}

.goal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.goal-header h3 {
    font-size: 1rem;
    color: var(--text);
    margin: 0;
}

.goal-edit-btn {
    background: none;
    border: 1px solid var(--primary);
    color: var(--primary);
    padding: 5px 12px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.3s;
}

.goal-edit-btn:hover {
    background: var(--primary);
    color: white;
}

.no-goal {
    text-align: center;
    color: var(--text-muted);
    font-size: 0.9rem;
}

.goal-progress {
    display: flex;
    align-items: center;
    gap: 15px;
}

.progress-info {
    display: flex;
    align-items: baseline;
    gap: 3px;
}

.progress-info .current {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
}

.progress-info .divider {
    color: var(--text-muted);
}

.progress-info .target {
    font-size: 1rem;
    color: var(--text-light);
}

.progress-bar-wrapper {
    flex: 1;
    height: 10px;
    background: var(--border);
    border-radius: 5px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-light), var(--primary));
    border-radius: 5px;
    transition: width 0.5s ease;
}

.progress-percent {
    font-size: 0.9rem;
    color: var(--text-light);
    min-width: 40px;
}

.goal-complete {
    text-align: center;
    color: var(--success);
    font-weight: 500;
    margin-top: 10px;
}

.goal-input-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin: 20px 0;
}

.goal-input {
    width: 80px;
    padding: 12px;
    text-align: center;
    font-size: 1.5rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-family: inherit;
}

.goal-input:focus {
    outline: none;
    border-color: var(--primary);
}

.goal-presets {
    display: flex;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}

.goal-presets button {
    padding: 8px 16px;
    border: 1px solid var(--border);
    background: var(--background);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
}

.goal-presets button:hover {
    border-color: var(--primary);
    background: rgba(139, 115, 85, 0.1);
}

/* ============ 캘린더 ============ */

.calendar-section {
    background: var(--surface);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 30px;
    box-shadow: 0 2px 10px var(--shadow);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.calendar-header h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin: 0;
}

.calendar-nav {
    background: none;
    border: 1px solid var(--border);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.3s;
}

.calendar-nav:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    text-align: center;
    margin-bottom: 10px;
}

.calendar-weekdays span {
    font-size: 0.8rem;
    color: var(--text-muted);
    padding: 8px 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.9rem;
    cursor: default;
    position: relative;
    transition: all 0.2s;
}

.calendar-day.empty {
    background: transparent;
}

.calendar-day.today {
    border: 2px solid var(--primary);
}

.calendar-day.has-writing {
    background: rgba(139, 115, 85, 0.15);
    cursor: pointer;
}

.calendar-day.medium {
    background: rgba(139, 115, 85, 0.3);
    cursor: pointer;
}

.calendar-day.high {
    background: var(--primary);
    color: white;
    cursor: pointer;
}

.calendar-day:not(.empty):hover {
    transform: scale(1.1);
}

.day-number {
    font-weight: 500;
}

.day-count {
    font-size: 0.65rem;
    position: absolute;
    bottom: 2px;
    right: 4px;
}

.calendar-legend {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 15px;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 3px;
    background: rgba(139, 115, 85, 0.15);
    margin-right: 5px;
    vertical-align: middle;
}

.legend-dot.medium {
    background: rgba(139, 115, 85, 0.3);
}

.legend-dot.high {
    background: var(--primary);
}

/* ============ 통계 페이지 ============ */

.stats-overview {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 15px;
    margin-bottom: 30px;
}

.overview-card {
    background: var(--surface);
    border-radius: 12px;
    padding: 20px 15px;
    text-align: center;
    box-shadow: 0 2px 10px var(--shadow);
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.overview-card.highlight {
    background: linear-gradient(135deg, #FFF8DC, #FFE4C4);
}

.overview-icon {
    font-size: 1.5rem;
}

.overview-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
}

.overview-label {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.stats-section {
    background: var(--surface);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 2px 10px var(--shadow);
}

.stats-section h3 {
    font-size: 1.1rem;
    color: var(--text);
    margin-bottom: 20px;
}

.horizontal-bars {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.bar-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.bar-row .bar-label {
    min-width: 80px;
    font-size: 0.9rem;
}

.bar-track {
    flex: 1;
    height: 24px;
    background: var(--border);
    border-radius: 12px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 12px;
    transition: width 0.5s ease;
}

.bar-fill.source-book { background: var(--primary); }
.bar-fill.source-quote { background: var(--accent); }
.bar-fill.source-thought { background: var(--success); }
.bar-fill.source-other { background: var(--secondary); }

.bar-row .bar-value {
    min-width: 80px;
    font-size: 0.85rem;
    color: var(--text-light);
    text-align: right;
}

.mood-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 15px;
}

.mood-item {
    text-align: center;
    padding: 15px 10px;
    background: var(--background);
    border-radius: 12px;
}

.mood-emoji-large {
    font-size: 2rem;
    margin-bottom: 8px;
}

.mood-name {
    font-size: 0.85rem;
    color: var(--text);
    margin-bottom: 5px;
}

.mood-count {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.mood-bar {
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    overflow: hidden;
}

.mood-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.5s ease;
}

.bar-chart {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    height: 200px;
    padding-top: 30px;
}

.bar-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 50px;
}

.bar-value-top {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    margin-bottom: 8px;
}

.bar-visual {
    width: 40px;
    height: 150px;
    background: var(--border);
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: flex-end;
    overflow: hidden;
}

.bar-inner {
    width: 100%;
    background: linear-gradient(to top, var(--primary), var(--primary-light));
    border-radius: 8px 8px 0 0;
    transition: height 0.5s ease;
}

.bar-month {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 8px;
}

.stats-actions {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 30px;
}

.no-data {
    text-align: center;
    color: var(--text-muted);
    padding: 30px;
}

/* 반응형 */
@media (max-width: 600px) {
    .container {
        padding: 15px;
    }

    .header {
        padding: 30px 15px;
    }

    .logo h1 {
        font-size: 1.6rem;
    }

    .source-types {
        grid-template-columns: repeat(2, 1fr);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .mood-selector {
        justify-content: center;
    }

    .filter-bar {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        justify-content: center;
    }

    .search-input {
        width: 100%;
    }

    .cta-section {
        flex-direction: column;
    }

    .modal-content {
        padding: 25px;
    }

    .modal-actions {
        flex-direction: column;
    }

    .report-header {
        flex-direction: column;
        text-align: center;
    }

    .detail-footer {
        flex-direction: column;
        gap: 15px;
    }

    .stats-overview {
        grid-template-columns: repeat(2, 1fr);
    }

    .calendar-day {
        font-size: 0.8rem;
    }

    .bar-chart {
        height: 180px;
    }

    .bar-column {
        width: 40px;
    }

    .bar-visual {
        width: 30px;
        height: 120px;
    }

    .action-cards {
        grid-template-columns: 1fr 1fr;
    }
}
