/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Language switcher */
.lang-switch-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 20px;
    background: #fff;
    color: #333;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.1);
    transition: background 0.15s, box-shadow 0.15s;
    display: none; /* Temporarily hidden */
}
.lang-switch-btn:hover {
    background: #f5f5f5;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

/* Top right button container */
.top-right-buttons {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1001;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: flex-end;
}

#logoutBtn {
    position: fixed;
    top: 16px;
    right: 16px;
    z-index: 1001;
    display: block !important;
}

body {
    font-family: Georgia, 'Times New Roman', 'Noto Serif CJK SC', 'Source Han Serif SC', 'Songti SC', SimSun, serif;
    background: #ffffff;
    min-height: 100vh;
    padding: 28px;
    color: #222;
    letter-spacing: 0.005em;
}

.container {
    max-width: 1120px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 18px;
    padding: 44px;
    border: 1px solid #e8e8e8;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.06);
}

/* Header */
header {
    text-align: center;
    margin-bottom: 40px;
    position: relative;
    padding: 10px 0;
}

.back-link {
    position: absolute;
    left: 0;
    top: 10px;
    color: #4a4a4a;
    text-decoration: none;
    font-size: 16px;
    padding: 8px 16px;
    border-radius: 8px;
    transition: background 0.3s;
}

.back-link:hover {
    background: #f0f0f0;
}

#logoutBtn {
    position: fixed;
    right: 16px;
    top: 5px;
    z-index: 1001;
    display: block !important;
}

h1 {
    color: #222;
    font-size: 2.5em;
    margin-bottom: 12px;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.subtitle {
    color: #555;
    font-size: 1.08em;
    line-height: 1.7;
}

/* Welcome Section */
.welcome-section {
    text-align: center;
    margin-bottom: 40px;
}

.welcome-section h2 {
    color: #333;
    margin-bottom: 15px;
}

.welcome-section p {
    color: #666;
    line-height: 1.6;
}

/* Conditions Grid */
.conditions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

.condition-card {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 18px;
    padding: 32px;
    text-align: center;
    transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.04);
}

.condition-card:hover {
    transform: translateY(-4px);
    border-color: #d5d5d5;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.08);
}

.condition-number {
    display: inline-block;
    background: #333;
    color: white;
    width: 54px;
    height: 54px;
    border-radius: 50%;
    line-height: 54px;
    font-size: 1.15em;
    font-weight: bold;
    margin-bottom: 18px;
}

.condition-card h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.5em;
}

.condition-card p {
    color: #666;
    margin-bottom: 20px;
    line-height: 1.5;
}

.condition-card ul {
    text-align: left;
    list-style: none;
    margin-bottom: 25px;
}

.condition-card li {
    padding: 8px 0;
    color: #555;
}

.condition-card li:before {
    content: "✓ ";
    color: #4a4a4a;
    font-weight: bold;
    margin-right: 8px;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 13px 28px;
    border: none;
    border-radius: 999px;
    font-size: 16px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, background 0.2s, border-color 0.2s;
    text-decoration: none;
    font-weight: 650;
    letter-spacing: 0.01em;
}

.btn-primary {
    background: #ffffff;
    color: #222;
    border: 1px solid #333;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.btn-primary:hover {
    background: #f6f6f6;
    transform: translateY(-2px);
    box-shadow: 0 8px 18px rgba(0, 0, 0, 0.10);
}

.btn-secondary {
    background: #f7f7f7;
    color: #222;
    border: 1px solid #d8d8d8;
}

.btn-secondary:hover {
    background: #eeeeee;
    transform: translateY(-2px);
}

.btn-disabled {
    background: #ccc !important;
    cursor: not-allowed !important;
    opacity: 0.6;
}

.btn-disabled:hover {
    transform: none !important;
    box-shadow: none !important;
}

.btn-sm {
    padding: 8px 20px;
    font-size: 14px;
}

.btn-icon {
    background: none;
    border: none;
    color: #4a4a4a;
    cursor: pointer;
    font-size: 14px;
    padding: 5px 10px;
}

.btn-icon:hover {
    text-decoration: underline;
}

/* Info Section */
.info-section {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
}

.info-section h3 {
    text-align: center;
    color: #333;
    margin-bottom: 20px;
}

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

.practice-item {
    background: white;
    padding: 15px;
    border-radius: 10px;
    text-align: center;
    border-left: 4px solid #4a4a4a;
}

.practice-item strong {
    display: block;
    color: #333;
    margin-bottom: 5px;
}

.practice-item span {
    color: #999;
    font-size: 0.9em;
}

.citation {
    text-align: center;
    color: #999;
    font-size: 0.9em;
    font-style: italic;
}

/* Instructions */
.instructions {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
}

.instructions h3 {
    color: #333;
    margin-bottom: 15px;
}

.instructions ul {
    list-style: none;
}

.instructions li {
    padding: 8px 0;
    color: #555;
}

.instructions li:before {
    content: "• ";
    color: #ffc107;
    font-weight: bold;
    margin-right: 8px;
}

/* User Info Section */
.user-info-section {
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 30px;
}

.user-info-section label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 500;
}

.user-info-section input {
    width: 100%;
    max-width: 400px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.user-info-section input:focus {
    outline: none;
    border-color: #4a4a4a;
}

/* Diary Section */
.diary-section {
    margin-bottom: 40px;
}

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

.diary-header h2 {
    color: #333;
}

.date-display {
    color: #666;
    font-size: 1.1em;
}

.writing-area {
    position: relative;
}

/* Editor container for ghost text overlay */
.editor-container {
    position: relative;
    width: 100%;
}

.writing-area textarea {
    width: 100%;
    padding: 24px;
    border: 1.5px solid #dcdcdc;
    border-radius: 14px;
    font-size: 17px;
    font-family: inherit;
    line-height: 1.9;
    resize: vertical;
    transition: border-color 0.25s, box-shadow 0.25s, background 0.25s;
    background: #fff;
    position: relative;
    z-index: 1;
    color: #222;
}

.writing-area textarea:focus {
    outline: none;
    border-color: #555;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.06);
    background: #fff;
}

/* Ghost Text Styling - Copilot style */
.ghost-text {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    padding: 24px;
    border: 1.5px solid transparent;
    border-radius: 14px;
    font-size: 17px;
    font-family: inherit;
    line-height: 1.9;
    color: #888;
    opacity: 0.5;
    white-space: pre-wrap;
    word-wrap: break-word;
    z-index: 2;
    overflow: hidden;
    pointer-events: none;
    background: transparent;
    user-select: none;
    text-shadow: none;
}

.ghost-text.active {
    opacity: 0.8;
}

.word-count {
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #999;
    margin-top: 10px;
    font-size: 0.9em;
}

.ghost-hint {
    color: #7c6245;
    font-size: 0.85em;
    animation: pulse 2s infinite;
}

.ghost-hint kbd {
    background: #f0f0f0;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 2px 6px;
    font-family: monospace;
    font-size: 0.9em;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.action-buttons {
    display: flex;
    gap: 15px;
    margin-top: 20px;
}

/* Prompt Panel (Condition 3) */
.prompt-panel {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

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

.prompt-header h3 {
    color: #333;
    margin: 0;
}

.prompts-container {
    margin-top: 15px;
}

.prompt-intro {
    color: #666;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.prompts-list {
    margin-bottom: 15px;
}

.prompt-group {
    margin-bottom: 20px;
}

.prompt-label {
    color: #4a4a4a;
    font-weight: 500;
    margin-bottom: 10px;
}

.prompt-examples {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.example-chip {
    background: white;
    border: 1px solid #4a4a4a;
    color: #4a4a4a;
    padding: 6px 15px;
    border-radius: 20px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.example-chip:hover {
    background: #4a4a4a;
    color: white;
}

.prompt-examples {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 30px;
}

.example-box {
    background: white;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #4a4a4a;
}

.example-box p {
    line-height: 1.8;
    color: #555;
}

.example-box em {
    color: #4a4a4a;
    font-style: normal;
    font-weight: 500;
}

/* Feedback Section (Condition 2) */
.feedback-section {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 40px;
}

.feedback-header {
    text-align: center;
    margin-bottom: 30px;
}

.feedback-header h2 {
    color: #4a4a4a;
    margin-bottom: 10px;
}

.feedback-header p {
    color: #666;
}

.feedback-content {
    background: white;
    border-radius: 10px;
    padding: 30px;
}

.feedback-summary {
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
}

.feedback-summary p {
    color: #555;
    line-height: 1.6;
}

.feedback-section-item {
    margin-bottom: 30px;
    padding-bottom: 30px;
    border-bottom: 1px solid #eee;
}

.feedback-section-item:last-child {
    border-bottom: none;
}

.feedback-category {
    color: #333;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-number {
    display: inline-block;
    background: #4a4a4a;
    color: white;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    text-align: center;
    line-height: 30px;
    font-size: 0.9em;
}

.feedback-questions {
    list-style: none;
    padding-left: 40px;
}

.feedback-questions li {
    padding: 10px 0;
    color: #555;
    line-height: 1.6;
    position: relative;
}

.feedback-questions li:before {
    content: "?";
    position: absolute;
    left: -30px;
    color: #4a4a4a;
    font-weight: bold;
    background: #f0f0f0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    text-align: center;
    line-height: 20px;
    font-size: 0.9em;
}

.feedback-footer {
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
}

.feedback-footer p {
    color: #555;
    line-height: 1.6;
}

/* Entry History */
.entry-history {
    margin-bottom: 30px;
}

.entry-history h3 {
    color: #333;
    margin-bottom: 20px;
}

.entry-list {
    display: grid;
    gap: 15px;
}

.entry-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 10px;
    padding: 20px;
    border-left: 4px solid #4a4a4a;
    transition: transform 0.3s;
}

.entry-item:hover {
    transform: translateX(5px);
}

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

.entry-number {
    font-weight: bold;
    color: #4a4a4a;
}

.entry-date {
    color: #999;
    font-size: 0.9em;
}

.entry-badge {
    background: #f0f0f0;
    color: #333;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.8em;
}

.entry-preview {
    color: #555;
    line-height: 1.6;
}

.empty-state {
    text-align: center;
    color: #999;
    padding: 40px;
    font-style: italic;
}

/* Progress Section */
.progress-section {
    background: #fff;
    color: #222;
    border: 1px solid #e8e8e8;
    border-radius: 18px;
    padding: 30px;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.04);
}

.progress-section h3 {
    text-align: center;
    margin-bottom: 20px;
}

.progress-info {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.progress-item {
    background: #f7f7f7;
    padding: 20px;
    border-radius: 14px;
    text-align: center;
    color: #222;
}

.progress-item span {
    display: inline;
    margin-right: 5px;
    opacity: 0.9;
}

.progress-item strong {
    font-size: 2em;
    display: inline;
    margin: 0 5px;
}

/* Event Selection Section (Condition 2) */
.event-selection-section {
    background: #fff;
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 30px;
}

.event-selection-header {
    text-align: center;
    margin-bottom: 25px;
}

.event-selection-header h2 {
    color: #333;
    margin-bottom: 10px;
}

.event-selection-header p {
    color: #666;
    line-height: 1.6;
}

.event-group-list {
    display: grid;
    gap: 15px;
}

.event-group-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 20px 25px;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.event-group-card:hover {
    border-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.event-group-title {
    font-size: 1.15em;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.event-group-summary {
    color: #666;
    line-height: 1.5;
    font-size: 0.95em;
}

/* Continue Reflection Section (Condition 2) */
.continue-section {
    margin-top: 30px;
    padding-top: 25px;
    border-top: 1px solid #eee;
}

.continue-section h3 {
    text-align: center;
    color: #333;
    margin-bottom: 18px;
}

/* Reflection Section (Condition 2) */
.reflection-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.reflection-header {
    text-align: center;
    margin-bottom: 30px;
}

.reflection-header h2 {
    color: #4a4a4a;
    margin-bottom: 10px;
}

.progress-indicator {
    display: inline-block;
    background: #f0f0f0;
    padding: 8px 20px;
    border-radius: 20px;
    color: #4a4a4a;
    font-weight: 600;
    margin-top: 10px;
}

.reflection-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.diary-display-area {
    background: #f9f9f9;
    padding: 20px;
    border-radius: 10px;
    border: 1px solid #eee;
    height: 300px;
    overflow-y: auto;
}

.diary-display-area h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: #4a4a4a;
    font-size: 1.1em;
}

.diary-display-text {
    white-space: pre-wrap;
    line-height: 1.8;
    color: #333;
}

.qa-area {
    display: flex;
    flex-direction: column;
}

.question-card {
    background: #fff;
    color: #333;
    border: 1px solid #eee;
    padding: 30px;
    border-radius: 15px;
    margin-bottom: 25px;
}

.question-number {
    font-size: 0.9em;
    opacity: 0.9;
    margin-bottom: 10px;
}

.question-text {
    font-size: 1.3em;
    font-weight: 500;
    line-height: 1.6;
}

.answer-area {
    margin-bottom: 20px;
}

.answer-area textarea {
    width: 100%;
    padding: 20px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 16px;
    font-family: inherit;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s;
}

.answer-area textarea:focus {
    outline: none;
    border-color: #4a4a4a;
}

.answer-count {
    text-align: right;
    color: #999;
    margin-top: 10px;
    font-size: 0.9em;
}

/* Reflection Guide (Condition 1) */
.reflection-guide {
    background: #fff;
    border: 1px solid #e6e6e6;
    border-radius: 12px;
    padding: 20px 24px;
    margin-bottom: 25px;
}

.reflection-guide-intro {
    color: #222;
    line-height: 1.75;
    margin: 0 0 16px 0;
}

.reflection-guide-steps {
    margin: 0;
    padding-left: 0;
    color: #222;
    line-height: 1.75;
    list-style: none;
    counter-reset: reflection-step;
}

.reflection-guide-steps li {
    counter-increment: reflection-step;
    position: relative;
    background: #fff;
    border: 1px solid #eeeeee;
    border-radius: 10px;
    padding: 10px 14px 10px 44px;
    margin-bottom: 8px;
}

.reflection-guide-steps li::before {
    content: counter(reflection-step);
    position: absolute;
    left: 14px;
    top: 10px;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    background: #333;
    color: #fff;
    font-size: 0.85em;
    line-height: 22px;
    text-align: center;
    font-weight: 700;
}

/* Privacy Notice */
.privacy-notice {
    background: #fff8e6;
    border: 1px solid #ffe2a8;
    border-left: 4px solid #ffc107;
    border-radius: 12px;
    padding: 16px 20px;
    margin-bottom: 25px;
    color: #8a6d3b;
    line-height: 1.6;
    font-size: 0.95em;
}

/* Selection Section */
.selection-section {
    background: #fff;
    border: 1px solid #e8e8e8;
    border-radius: 18px;
    padding: 44px;
    margin-bottom: 30px;
    text-align: center;
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.04);
}

.selection-section h2 {
    color: #222;
    margin-bottom: 30px;
    font-size: 1.8em;
    letter-spacing: -0.02em;
}

.selection-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    max-width: 600px;
    margin: 0 auto;
}

.selection-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 34px 22px;
    border-radius: 20px;
    font-size: 1.1em;
    transition: transform 0.25s, box-shadow 0.25s, background 0.25s;
    min-height: 130px;
}

.selection-btn .btn-icon {
    font-size: 2.5em;
    margin-bottom: 10px;
}

.selection-btn .btn-text {
    font-weight: 500;
}

.selection-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 30px rgba(92, 72, 48, 0.16);
}

.selection-btn.btn-primary:hover {
    background: #f6f6f6;
}

.selection-btn.btn-secondary:hover {
    background: #eeeeee;
}

/* Narrative Section (Condition 2) */
.narrative-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    margin-bottom: 30px;
}

.narrative-header {
    text-align: center;
    margin-bottom: 30px;
}

.narrative-header h2 {
    color: #4a4a4a;
    margin-bottom: 10px;
}

.narrative-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-bottom: 30px;
}

.original-diary,
.reconstructed-narrative {
    background: #fff;
    border: 1px solid #eee;
    padding: 25px;
    border-radius: 10px;
}

.original-diary h3,
.reconstructed-narrative h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.1em;
}

.diary-text,
.narrative-text {
    line-height: 1.8;
    color: #555;
    white-space: pre-wrap;
}

/* 高亮“基于反思回答而重新叙述”的部分 */
.narrative-highlight {
    font-weight: 700;
    color: #2c3e50;
    background: linear-gradient(transparent 60%, #ffe9a8 60%);
    padding: 0 2px;
    border-radius: 2px;
}

/* 重构叙事的手动编辑区 */
.narrative-edit-hint {
    background: #fff8e6;
    border: 1px solid #ffe2a8;
    color: #8a6d3b;
    font-size: 0.9em;
    line-height: 1.6;
    padding: 12px 14px;
    border-radius: 8px;
    margin-bottom: 12px;
}

.narrative-editor {
    width: 100%;
    box-sizing: border-box;
    border: 1px solid #d9d9d9;
    border-radius: 8px;
    padding: 14px;
    font-size: 1em;
    line-height: 1.8;
    color: #333;
    font-family: inherit;
    resize: vertical;
}

.narrative-editor:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.narrative-edit-actions {
    margin-top: 12px;
    display: flex;
    gap: 10px;
}

.btn-sm {
    padding: 8px 16px;
    font-size: 0.9em;
}

.reconstructed-narrative {
    background: #fff;
    border: 1px solid #eee;
}

.entry-badge {
    display: inline-block;
    background: #f0f0f0;
    color: #333;
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 0.85em;
    margin-top: 10px;
}

.entry-item {
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.entry-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

/* Modal for viewing entries */
.modal-overlay {
    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;
    animation: fadeIn 0.3s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background: white;
    border-radius: 15px;
    max-width: 800px;
    max-height: 90vh;
    width: 90%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 25px 30px;
    border-bottom: 2px solid #f0f0f0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    margin: 0;
    color: #4a4a4a;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: #999;
    cursor: pointer;
    padding: 0;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    transition: all 0.3s;
}

.modal-close:hover {
    background: #f0f0f0;
    color: #333;
}

.modal-body {
    padding: 30px;
    overflow-y: auto;
}

.entry-date-full {
    text-align: center;
    color: #999;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.modal-section {
    margin-bottom: 30px;
}

.modal-section h3 {
    color: #333;
    margin-bottom: 15px;
    font-size: 1.2em;
}

.modal-text {
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 10px;
    line-height: 1.8;
    color: #555;
    white-space: pre-wrap;
}

.modal-text.reconstructed {
    background: #fff;
    border: 1px solid #eee;
}

.reflection-answers {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.answer-item {
    background: #fff;
    border: 1px solid #eee;
    padding: 20px;
    border-radius: 10px;
}

.answer-question {
    font-weight: 600;
    color: #4a4a4a;
    margin-bottom: 10px;
}

.answer-text {
    color: #555;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* Notification */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 25px;
    border-radius: 10px;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
    transform: translateX(400px);
    transition: transform 0.3s;
    z-index: 1000;
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid #4caf50;
    color: #4caf50;
}

.notification.error {
    border-left: 4px solid #f44336;
    color: #f44336;
}

.notification.info {
    border-left: 4px solid #2196f3;
    color: #2196f3;
}

/* Responsive Design */
@media (max-width: 768px) {
    .container {
        padding: 20px;
    }

    h1 {
        font-size: 1.8em;
    }

    .conditions-grid {
        grid-template-columns: 1fr;
    }

    .practices-grid {
        grid-template-columns: 1fr;
    }

    .action-buttons {
        flex-direction: column;
    }

    .action-buttons .btn {
        width: 100%;
    }

    .back-link {
        position: static;
        display: block;
        margin-bottom: 20px;
    }
}
