:root {
    --primary-color: #4a90e2;
    --background-color: #f8f9fa;
    --card-background: #ffffff;
    --text-color: #333333;
    --border-color: #dddddd;
    --main-goal-bg: #e3f2fd;
    --sub-goal-bg: #f1f8e9;
    --action-item-bg: #ffffff;
    --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
}

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

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, system-ui, Roboto, sans-serif;
    background-color: var(--background-color);
    color: var(--text-color);
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 2rem 1rem;
    min-height: 100vh;
}

.header {
    text-align: center;
    margin-bottom: 2rem;
    width: 100%;
    max-width: 900px;
}

.header h1 {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.header p {
    font-size: 1rem;
    opacity: 0.8;
}

.status-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    max-width: 900px;
    margin-bottom: 1.5rem;
    padding: 1rem;
    background-color: var(--card-background);
    border-radius: 8px;
    box-shadow: var(--shadow);
    flex-wrap: wrap;
    gap: 1rem;
}

.current-time {
    font-size: 1.1rem;
    font-weight: 500;
    color: var(--primary-color);
}

.deadline-setter {
    display: flex;
    align-items: center;
    gap: 10px;
}

.deadline-setter label {
    font-weight: 600;
    font-size: 0.9rem;
}

.deadline-setter input[type="date"] {
    padding: 5px 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--action-item-bg);
    color: var(--text-color);
    font-family: inherit;
    outline: none;
}

/* Mandalart Grid */
.mandalart-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 15px;
    width: 100%;
    max-width: 900px;
    aspect-ratio: 1 / 1;
}

.block {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 2px;
    background-color: var(--border-color);
    border: 2px solid var(--border-color);
    border-radius: 4px;
    overflow: hidden;
}

.block-4 { border: 2px solid var(--primary-color); }

.cell-wrapper {
    position: relative;
    width: 100%;
    height: 100%;
}

/* 수직 중앙 정렬을 위해 div contenteditable 사용 예정 */
.cell {
    width: 100%;
    height: 100%;
    padding: 10px;
    border: none;
    outline: none;
    font-family: inherit;
    font-size: 0.85rem;
    text-align: center;
    background-color: var(--action-item-bg);
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: center;
    word-break: keep-all;
    line-height: 1.4;
    cursor: text;
    transition: all 0.2s;
    overflow: hidden;
}

.cell:focus {
    background-color: var(--primary-color) !important;
    color: white;
}

/* 이미지 배경 */
.cell.has-image {
    background-size: cover;
    background-position: center;
    color: white;
    text-shadow: 0 0 5px rgba(0,0,0,0.8);
}

.cell.has-image::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 0;
}

.cell * { z-index: 1; position: relative; }

.image-upload-btn, .image-delete-btn {
    position: absolute;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    cursor: pointer;
    opacity: 0;
    transition: all 0.2s;
    z-index: 10;
    border: none;
}

.image-upload-btn { bottom: 5px; right: 5px; background: rgba(255, 255, 255, 0.8); border: 1px solid #ccc; }
.image-delete-btn { top: 5px; right: 5px; background: rgba(255, 77, 77, 0.9); color: white; visibility: hidden; }

.cell.has-image ~ .image-delete-btn { visibility: visible; }
.cell-wrapper:hover .image-upload-btn, .cell-wrapper:hover .image-delete-btn { opacity: 1; }

.main-goal { background-color: var(--main-goal-bg) !important; font-weight: bold; color: var(--primary-color); }
.sub-goal { background-color: var(--sub-goal-bg) !important; font-weight: 600; }

/* Divider - 점선으로 변경 */
.divider {
    width: 100%;
    max-width: 900px;
    height: 0;
    border-top: 2px dotted var(--border-color);
    margin: 4rem 0;
}

/* 성경 구절 섹션 */
.verses-section {
    width: 100%;
    max-width: 900px;
    margin-bottom: 4rem;
    text-align: center;
}

.verses-section h2 {
    font-size: 1.4rem;
    color: var(--primary-color);
    margin-bottom: 2.5rem;
}

.verses-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.verse-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.verse-input {
    width: 100%;
    background: none;
    border: none;
    border-bottom: 1px solid var(--primary-color);
    color: var(--text-color);
    font-size: 0.95rem;
    padding: 10px 0;
    text-align: center;
    font-style: italic;
    outline: none;
    transition: all 0.3s;
}

.verse-input:focus {
    border-bottom-width: 2px;
    background-color: rgba(74, 144, 226, 0.05);
}

/* 예시 섹션 */
.example-section {
    width: 100%;
    max-width: 900px;
    margin-top: 2rem;
    padding-top: 3rem;
    border-top: 1px solid var(--border-color);
    text-align: center;
}

.example-section h2 { margin-bottom: 2rem; color: var(--primary-color); font-size: 1.3rem; }

.example-mandalart {
    transform: scale(0.5);
    transform-origin: top center;
    margin-bottom: -450px;
}

@media (max-width: 600px) {
    .mandalart-container { gap: 5px; }
    .cell { font-size: 0.7rem; padding: 5px; }
    .header h1 { font-size: 1.5rem; }
    .verses-grid { grid-template-columns: 1fr; gap: 20px; }
}

.footer {
    margin-top: 4rem;
    text-align: center;
    font-size: 0.85rem;
    opacity: 0.6;
    padding-bottom: 2rem;
}
