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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 10px;
}

header {
    text-align: center;
    margin-bottom: 30px;
    background: white;
    padding: 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 타이틀 스타일 */
header h1 {
    text-align: center;
    margin-bottom: 20px;
    font-size: 28px;
    font-weight: bold;
    color: #333;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

header h1 #userNameDisplay {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: bold;
}

.btn-small {
    padding: 8px 16px;
    font-size: 0.9rem;
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.btn-small:hover {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(72, 187, 120, 0.3);
}

/* 헤더 내부 컨트롤 버튼들 */
header .controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin: 15px 0;
    flex-wrap: wrap;
    align-items: center;
}

header .controls .btn {
    padding: 10px 20px;
    font-size: 0.95rem;
    width: 120px;
}

/* 불러오기 섹션 */
.import-section {
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-width: 120px;
}

.import-section .btn {
    width: 120px;
}

.json-file-select {
    width: 120px;
    padding: 10px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.9rem;
    background: white;
    transition: border-color 0.3s ease;
    cursor: pointer;
    height: 42px; /* 버튼과 같은 높이 */
    box-sizing: border-box;
}

.json-file-select:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.json-file-select:hover {
    border-color: #cbd5e0;
}

/* 파일 선택 섹션 */
.file-select-section {
    display: flex;
    gap: 8px;
    align-items: center;
}

.file-select-section .json-file-select {
    width: 120px;
}

.file-select-section .btn {
    padding: 10px 15px;
    font-size: 0.9rem;
    height: 42px;
    box-sizing: border-box;
    width: 120px;
}

.btn-danger {
    background: linear-gradient(135deg, #e53e3e, #c53030);
    color: white;
}

.btn-danger:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(229, 62, 62, 0.4);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

/* 팝업이 열려있을 때 백그라운드 스크롤 방지 */
body.popup-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* 최상위로 이동 버튼 */
.scroll-to-top-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    font-size: 20px;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    opacity: 0;
    visibility: hidden;
    z-index: 1000;
}

.scroll-to-top-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
    background: linear-gradient(135deg, #764ba2 0%, #667eea 100%);
}

.scroll-to-top-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.2);
}

.scroll-to-top-btn.show {
    opacity: 1;
    visibility: visible;
}

/* 모바일에서 버튼 크기 조정 */
@media (max-width: 768px) {
    .scroll-to-top-btn {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 18px;
    }
}

@media (max-width: 480px) {
    .scroll-to-top-btn {
        bottom: 15px;
        right: 15px;
        width: 40px;
        height: 40px;
        font-size: 16px;
    }
}

/* 설치 버튼 */
.install-btn {
    background: linear-gradient(135deg, #48bb78, #38a169) !important;
    border: none;
    color: white;
    font-weight: 600;
    animation: pulse 2s infinite;
}

.install-btn:hover {
    background: linear-gradient(135deg, #38a169, #2f855a) !important;
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(72, 187, 120, 0.4);
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(72, 187, 120, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(72, 187, 120, 0);
    }
}

/* 모바일에서 설치 버튼 숨기기 (자동 설치 프롬프트 사용) */
@media (max-width: 768px) {
    .install-btn {
        display: none !important;
    }
}

/* 사용자 이름 편집 팝업 */
.name-popup {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.name-popup.show {
    opacity: 1;
    visibility: visible;
}

.name-popup-content {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    max-width: 400px;
    width: 90%;
    text-align: center;
}

.name-popup-content h3 {
    margin-bottom: 20px;
    color: #4a5568;
    font-size: 1.5rem;
}

.name-input-section {
    margin-bottom: 25px;
    text-align: left;
}

.name-input-section label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #4a5568;
}

#userNameInput {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s ease;
}

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

.name-popup-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.name-popup-actions .btn {
    min-width: 60px;
}

h1 {
    font-size: 2.5rem;
    color: #4a5568;
    margin-bottom: 10px;
}

.subtitle {
    font-size: 1.2rem;
    color: #718096;
    margin-bottom: 20px;
}

.progress-info {
    margin-top: 20px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e2e8f0;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 10px;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #48bb78, #38a169);
    width: 0%;
    transition: width 0.3s ease;
}

.progress-text {
    font-size: 1.1rem;
    color: #4a5568;
    font-weight: 600;
}

.controls {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #48bb78, #38a169);
    color: white;
}

.btn-success:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(72, 187, 120, 0.4);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

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

.bible-container {
    background: white;
    border-radius: 15px;
    padding: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* 성경 인덱스 섹션 */
.bible-index-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.index-header {
    text-align: center;
    margin-bottom: 20px;
}

.index-header h2 {
    font-size: 1.6rem;
    color: #2d3748;
    margin-bottom: 0;
}

.testament-index {
    margin-bottom: 20px;
}

.testament-index:last-child {
    margin-bottom: 0;
}

.index-title {
    font-size: 1.2rem;
    color: #4a5568;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e2e8f0;
}

.books-index-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-start;
    max-width: 100%;
}

.book-index-item {
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.75rem;
    font-weight: 700;
    color: #4a5568;
    position: relative;
    padding: 4px;
    box-sizing: border-box;
}

.book-index-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: #667eea;
}

.book-index-item.book-even {
    background: #e2e8f0;
}

.book-index-item.book-odd {
    background: #ffffff;
}

.book-index-name {
    font-size: 0.7rem;
    font-weight: 700;
    color: inherit;
    text-align: center;
    line-height: 1.1;
    margin-bottom: 2px;
}

.book-index-count {
    font-size: 0.6rem;
    color: #718096;
    text-align: center;
    font-weight: 600;
}

/* 완료 상태 스타일 */
.book-index-item.completed {
    background: linear-gradient(135deg, #48bb78, #38a169);
    border-color: #38a169;
    color: white;
}

.book-index-item.completed .book-index-name {
    color: white;
}

.book-index-item.completed .book-index-count {
    color: rgba(255, 255, 255, 0.9);
}

.completion-check {
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.8rem;
    color: white;
    font-weight: bold;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* 성경 구분별 섹션 */
.testament-section {
    margin-bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.testament-section:last-child {
    margin-bottom: 0;
}

/* 성경 책 스타일 */
.bible-book {
    border: 2px solid #e2e8f0;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    transition: all 0.3s ease;
    background: white;
}

.bible-book:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.1);
}

.bible-book.completed {
    border-color: #48bb78;
    background: linear-gradient(135deg, #f0fff4, #e6fffa);
}

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

.book-title {
    display: flex;
    align-items: center;
}

.book-name {
    font-size: 1.4rem;
    font-weight: 700;
    color: #2d3748;
}

.book-progress {
    font-size: 1rem;
    color: #718096;
    font-weight: 600;
}

/* 장 그리드 */
.chapters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 8px;
    margin-bottom: 15px;
}

.chapter-item {
    background: white;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    min-height: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    user-select: none;
    -webkit-user-select: none;
    -webkit-touch-callout: none;
    -webkit-tap-highlight-color: transparent;
}

.chapter-item:hover {
    border-color: #667eea;
    background-color: #f7fafc;
    transform: translateY(-1px);
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
}

.chapter-item:active {
    transform: scale(0.95);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* 모바일 길게 누르기 효과 */
.chapter-item.long-press {
    transform: scale(0.9);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    border-color: #667eea;
}

.chapter-item.read {
    background: linear-gradient(135deg, #48bb78, #38a169);
    border-color: #38a169;
    color: white;
}

.chapter-item.read::after {
    content: '✓';
    position: absolute;
    top: -6px;
    right: -6px;
    background: #48bb78;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: bold;
    border: 2px solid white;
}

/* 메모가 있는 장 표시 */
.chapter-item.has-memo::before {
    content: '📝';
    position: absolute;
    top: -6px;
    left: -6px;
    background: #667eea;
    color: white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    border: 2px solid white;
}

.chapter-number {
    font-size: 1.4rem;
    font-weight: 700;
    color: inherit;
}

/* 읽은 장의 텍스트 색상 조정 */
.chapter-item.read .chapter-number {
    color: white;
}

/* 책 액션 버튼 */
.book-actions {
    display: flex;
    gap: 8px;
}

.book-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 0.8rem;
    cursor: pointer;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.book-btn.read-all {
    background: #48bb78;
    color: white;
}

.book-btn.read-all:hover {
    background: #38a169;
}

.book-btn.unread-all {
    background: #e53e3e;
    color: white;
}

.book-btn.unread-all:hover {
    background: #c53030;
}

footer {
    text-align: center;
    margin-top: 30px;
    color: white;
    font-size: 1.1rem;
}

.version-info {
    margin-top: 10px;
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.8);
    opacity: 0.8;
}

.version-info span {
    font-weight: 500;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .container {
        padding: 8px;
    }
    
    h1 {
        font-size: 2rem;
    }
    
    header h1 {
        font-size: 24px;
    }
    
    .btn-small {
        padding: 6px 12px;
        font-size: 0.8rem;
    }
    
    header .controls {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 8px;
        justify-content: center;
        align-items: center;
    }
    
    header .controls .btn {
        width: 100px;
        padding: 10px 12px;
        font-size: 0.85rem;
    }
    
    .import-section {
        width: auto;
        display: flex;
        justify-content: center;
    }
    
    .import-section .btn {
        width: 100px;
    }
    
    .json-file-select {
        width: 100px;
        height: auto;
        padding: 10px 12px;
    }
    
    .file-select-section {
        flex-direction: row;
        gap: 8px;
        width: auto;
        justify-content: center;
    }
    
    .file-select-section .json-file-select {
        width: 100px;
    }
    
    .file-select-section .btn {
        width: 100px;
        height: auto;
        padding: 10px 12px;
    }
    
    /* 성경 인덱스 모바일 스타일 */
    .bible-index-section {
        padding: 15px;
        margin-bottom: 20px;
        align-items: center;
    }
    
    .index-header h2 {
        font-size: 1.4rem;
    }
    
    .book-index-item {
        width: 50px;
        height: 50px;
        font-size: 0.7rem;
    }
    
    .book-index-name {
        font-size: 0.65rem;
    }
    
    .book-index-count {
        font-size: 0.55rem;
    }
    
    .completion-check {
        font-size: 0.7rem;
    }
    
    /* 모바일 팝업 크기 조정 */
    .popup-content {
        max-height: 90vh;
        overflow-y: auto;
        margin: 5vh auto;
    }
    
    /* 모바일에서 성경 구절 창 크기 조정 */
    .bible-text {
        max-height: 150px;
        padding: 12px;
        font-size: 0.9rem;
    }
    
    .name-popup-content {
        padding: 20px;
        margin: 20px;
        max-height: 90vh;
        overflow-y: auto;
    }
    
    .name-popup-content h3 {
        font-size: 1.3rem;
    }
    
    .name-popup-actions {
        flex-direction: column;
        gap: 8px;
    }
    
    .name-popup-actions .btn {
        width: 100%;
    }
    
    .book-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .book-title {
        text-align: center;
    }
    
    .book-actions {
        justify-content: center;
    }
    
    .chapters-grid {
        grid-template-columns: repeat(auto-fill, minmax(35px, 1fr));
        gap: 5px;
    }
    
    .chapter-item {
        width: 35px;
        height: 35px;
    }
    
    .chapter-number {
        font-size: 1.2rem;
    }
    
    .chapter-info {
        display: none;
    }
    
    .controls {
        flex-direction: column;
        gap: 10px;
    }
    
    .btn {
        width: 100%;
        padding: 15px;
    }
    
    .book-actions {
        flex-wrap: wrap;
    }
    
    .version-info {
        font-size: 0.8rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 5px;
    }
    
    /* 헤더 컨트롤 작은 화면 최적화 */
    header .controls {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 6px;
        justify-content: center;
        align-items: center;
    }
    
    header .controls .btn {
        width: 80px;
        padding: 8px 10px;
        font-size: 0.8rem;
    }
    
    .import-section {
        display: flex;
        justify-content: center;
    }
    
    .import-section .btn {
        width: 80px;
    }
    
    .json-file-select {
        width: 80px;
        padding: 8px 10px;
    }
    
    .file-select-section .json-file-select {
        width: 80px;
    }
    
    .file-select-section {
        justify-content: center;
    }
    
    .file-select-section .btn {
        width: 80px;
        padding: 8px 10px;
    }
    
    /* 성경 인덱스 작은 화면 스타일 */
    .bible-index-section {
        padding: 10px;
        margin-bottom: 15px;
        align-items: center;
    }
    
    .index-header h2 {
        font-size: 1.2rem;
    }
    
    .book-index-item {
        width: 45px;
        height: 45px;
        font-size: 0.65rem;
    }
    
    .book-index-name {
        font-size: 0.6rem;
    }
    
    .book-index-count {
        font-size: 0.5rem;
    }
    
    .completion-check {
        font-size: 0.6rem;
    }
    
    .chapters-grid {
        grid-template-columns: repeat(auto-fill, minmax(30px, 1fr));
        gap: 3px;
    }
    
    .chapter-item {
        width: 30px;
        height: 30px;
    }
    
    .chapter-number {
        font-size: 1.1rem;
    }
    
    .chapter-info {
        display: none;
    }
    
    .book-name {
        font-size: 0.9rem;
        line-height: 1.2;
    }
    
    header h1 {
        font-size: 20px;
    }
    
    /* 작은 화면에서 팝업 크기 추가 조정 */
    .popup-content {
        max-height: 85vh;
        margin: 7.5vh auto;
        padding: 15px;
    }
    
    /* 작은 화면에서 성경 구절 창 크기 추가 조정 */
    .bible-text {
        max-height: 120px;
        padding: 10px;
        font-size: 0.85rem;
    }
    
    .name-popup-content {
        padding: 15px;
        margin: 15px;
        max-height: 85vh;
    }
    
    .name-popup-content h3 {
        font-size: 1.2rem;
    }
    
    .version-info {
        font-size: 0.75rem;
    }
}

/* 애니메이션 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.bible-book {
    animation: fadeIn 0.5s ease forwards;
}

/* 팝업 스타일 */
.chapter-popup {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.chapter-popup.show {
    display: flex;
    justify-content: center;
    align-items: center;
}

.popup-content {
    background: white;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideIn 0.3s ease;
    overflow-y: auto;
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px 15px;
    border-bottom: 1px solid #e2e8f0;
}

.popup-title-section {
    display: flex;
    align-items: center;
    gap: 15px;
}

.popup-header h3 {
    font-size: 1.3rem;
    color: #2d3748;
    margin: 0;
}

.popup-status {
    font-size: 0.9rem;
    padding: 4px 12px;
    border-radius: 20px;
    font-weight: 600;
    white-space: nowrap;
}

.popup-status.read {
    background: #48bb78;
    color: white;
}

.popup-status.unread {
    background: #e53e3e;
    color: white;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    color: #718096;
    cursor: pointer;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: #f7fafc;
    color: #4a5568;
}

.popup-body {
    padding: 20px 25px;
}



/* 성경 구절 섹션 */
.bible-text-section {
    margin-bottom: 20px;
}

.bible-text-label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 1rem;
}

.bible-text {
    max-height: 200px;
    overflow-y: auto;
    padding: 15px;
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    font-size: 0.95rem;
    line-height: 1.6;
    color: #495057;
    font-family: 'Georgia', serif;
    white-space: pre-line;
}

.bible-text::-webkit-scrollbar {
    width: 6px;
}

.bible-text::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

.bible-text::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

.bible-text::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 메모 섹션 */
.memo-section {
    margin-bottom: 20px;
}

.memo-label {
    display: block;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
    font-size: 1rem;
}

#memoTextarea {
    width: 100%;
    min-height: 150px;
    padding: 12px;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    line-height: 1.6;
    resize: vertical;
    transition: border-color 0.3s ease;
    box-sizing: border-box;
}

#memoTextarea:focus {
    outline: none;
    border-color: #667eea;
}

.chapter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
    flex-wrap: wrap;
}

.chapter-actions .btn {
    padding: 10px 20px;
    font-size: 0.9rem;
}

/* 애니메이션 */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateY(-50px) scale(0.9);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* 스크롤바 스타일링 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 연속 표시 섹션 */
.continuous-section {
    margin-bottom: 40px;
}

.continuous-header {
    background: linear-gradient(135deg, #f7fafc, #edf2f7);
    padding: 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    border-left: 5px solid #667eea;
    text-align: center;
}

.continuous-header h2 {
    font-size: 1.8rem;
    color: #2d3748;
    margin-bottom: 10px;
}

.continuous-progress {
    font-size: 1.1rem;
    color: #4a5568;
    font-weight: 600;
}

/* 연속 장 컨테이너 */
.continuous-chapters-container {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 100%;
}

/* 연속 장 그리드 */
.continuous-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    max-width: 100%;
    justify-content: flex-start;
}

/* 성경별 줄바꿈 */
.book-line-break {
    width: 100%;
    height: 20px;
    flex-basis: 100%;
}

/* 연속 장 아이템 */
.continuous-chapter {
    width: 60px;
    height: 60px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.85rem;
    font-weight: 600;
    color: #4a5568;
    position: relative;
    padding: 4px;
    box-sizing: border-box;
}

/* 성경별 배경색 (번갈아가며) */
.continuous-chapter.book-even {
    background: #e2e8f0; /* 진한 회색 */
}

.continuous-chapter.book-odd {
    background: #ffffff; /* 흰색 */
}

/* 성경 제목 칸 */
.book-title-item {
    width: 60px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #667eea;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    color: #667eea;
    position: relative;
    padding: 4px;
    text-align: center;
    line-height: 1.2;
    box-sizing: border-box;
}

/* 성경 제목 칸 배경색 (번갈아가며) */
.book-title-item.book-even {
    background: linear-gradient(135deg, #cbd5e0, #a0aec0);
}

.book-title-item.book-odd {
    background: linear-gradient(135deg, #f8fafc, #f1f5f9);
}

/* 성경 제목 텍스트 */
.book-title-text {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* 성경 제목 호버 효과 */
.book-title-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-color: #4c51bf;
    transition: all 0.3s ease;
}

.book-title-item:hover .book-title-text {
    color: #4c51bf;
}

/* 성경 제목 클릭 가능 표시 */
.book-title-item {
    position: relative;
}

.book-title-item::after {
    content: '🔗';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.6rem;
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.book-title-item:hover::after {
    opacity: 1;
}

/* 장 하이라이트 효과 */
.continuous-chapter.highlight {
    animation: highlightPulse 2s ease;
}

@keyframes highlightPulse {
    0% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0.7);
    }
    50% {
        transform: scale(1.1);
        box-shadow: 0 0 0 10px rgba(102, 126, 234, 0.3);
    }
    100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(102, 126, 234, 0);
    }
}

/* 성경 시작 장 (사용하지 않음) */
/* .continuous-chapter.book-start { ... } */

/* 성경 시작 장 배경색 (사용하지 않음) */
/* .continuous-chapter.book-start.book-even { ... } */
/* .continuous-chapter.book-start.book-odd { ... } */

/* 성경 이름 라벨 (사용하지 않음) */
/* .book-name-label { ... } */

.continuous-chapter:hover {
    border-color: #667eea;
    background: #edf2f7;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.continuous-chapter.read {
    background: linear-gradient(135deg, #48bb78, #38a169);
    border-color: #38a169;
    color: white;
}

.continuous-chapter.has-memo {
    position: relative;
}

.continuous-chapter.has-memo::after {
    content: '📝';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.7rem;
    opacity: 0.8;
}

.continuous-chapter.long-press {
    background: #667eea;
    border-color: #667eea;
    color: white;
    transform: scale(0.95);
}

/* 모바일에서 폰트 크기만 조정 */
@media (max-width: 768px) {
    .continuous-chapter {
        font-size: 0.8rem;
    }
    
    .book-title-item {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .continuous-chapter {
        font-size: 0.75rem;
    }
    
    .book-title-item {
        font-size: 0.65rem;
    }
}
