﻿/* CLEAN AND ORGANIZED CSS - Replace entire site.css */

/* ====================
   CSS VARIABLES
   ==================== */
:root {
    --primary: #7C9CBF;
    --primary-dark: #5A7BA6;
    --primary-light: #A3BDD9;
    --secondary: #8FBC8F;
    --secondary-dark: #6B9B6B;
    --accent: #D4A574;
    --danger: #E07B7B;
    --warning: #E8C07D;
    --success: #88B88B;
    --dark: #4A5568;
    --gray: #8B95A5;
    --light-gray: #F7F9FC;
    --lighter-gray: #FAFBFD;
    --white: #FFFFFF;
    --soft-purple: #B8A4D4;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.03);
    --shadow: 0 1px 3px 0 rgb(0 0 0 / 0.05), 0 1px 2px -1px rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.06), 0 2px 4px -2px rgb(0 0 0 / 0.06);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.07), 0 4px 6px -4px rgb(0 0 0 / 0.07);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.08), 0 8px 10px -6px rgb(0 0 0 / 0.08);
    --font-sans: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-serif: 'Noto Serif KR', Georgia, serif;
}

/* ====================
   GLOBAL STYLES
   ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    background: linear-gradient(135deg, #E8EAF6 0%, #F3E5F5 50%, #E1F5FE 100%);
    background-attachment: fixed;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    line-height: 1.7;
    color: var(--dark);
}

.main-wrapper {
    background: rgba(255, 255, 255, 0.85);
}

main {
    padding: 2rem 0;
}

/* ====================
   NAVIGATION
   ==================== */
.navbar {
    background: rgba(255, 255, 255, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: none;
    box-shadow: var(--shadow-md);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: all 0.3s ease;
}

.navbar-brand {
    font-weight: 700;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--soft-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-decoration: none;
}

.nav-link {
    color: var(--dark) !important;
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .nav-link:hover {
        background: var(--lighter-gray);
        transform: translateY(-1px);
        color: var(--primary) !important;
    }

/* ====================
   CARDS
   ==================== */
.card {
    border: 1px solid rgba(124, 156, 191, 0.1);
    border-radius: 16px;
    box-shadow: var(--shadow);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    background: var(--white);
}

    .card:hover {
        transform: translateY(-4px);
        box-shadow: var(--shadow-lg);
        border-color: rgba(124, 156, 191, 0.2);
    }

.card-header {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: var(--white);
    font-weight: 600;
    border: none;
    padding: 1rem 1.5rem;
}

    .card-header.bg-primary {
        background: linear-gradient(135deg, var(--primary-light), var(--primary)) !important;
    }

    .card-header.bg-secondary {
        background: linear-gradient(135deg, var(--secondary), var(--secondary-dark)) !important;
    }

/* ====================
   BUTTONS
   ==================== */
.btn {
    border-radius: 12px;
    padding: 0.6rem 1.5rem;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(124, 156, 191, 0.25);
        background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    }

.btn-success {
    background: linear-gradient(135deg, var(--secondary), var(--secondary-dark));
    color: var(--white);
    box-shadow: var(--shadow-sm);
}

    .btn-success:hover {
        transform: translateY(-2px);
        box-shadow: 0 6px 12px rgba(143, 188, 143, 0.25);
    }

.btn-outline-secondary {
    border: 1.5px solid var(--gray);
    color: var(--gray);
    background: var(--white);
}

    .btn-outline-secondary:hover {
        background: var(--primary-light);
        border-color: var(--primary-light);
        color: var(--white);
    }

.btn-outline-light:hover {
    background-color: rgba(255, 255, 255, 0.2);
    border-color: white;
}

/* ====================
   ALERTS
   ==================== */
.alert {
    border: none;
    border-radius: 12px;
    padding: 1rem 1.5rem;
    box-shadow: var(--shadow-sm);
    border-left: 4px solid;
}

.alert-success {
    background: rgba(136, 184, 139, 0.1);
    border-left-color: var(--success);
    color: var(--dark);
}

.alert-warning {
    background: rgba(232, 192, 125, 0.1);
    border-left-color: var(--warning);
    color: var(--dark);
}

.alert-danger {
    background: rgba(224, 123, 123, 0.1);
    border-left-color: var(--danger);
    color: var(--dark);
}

.alert-info {
    background: rgba(124, 156, 191, 0.1);
    border-left-color: var(--primary);
    color: var(--dark);
}

/* ====================
   MODAL - BOOTSTRAP
   ==================== */
/* MODAL FIX - Replace modal section in CSS */

/* Bootstrap Modal - Z-index Fix */
.modal {
    z-index: 10050 !important;
}

.modal-backdrop {
    z-index: 10040 !important;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal.show .modal-dialog {
    z-index: 10060 !important;
}

#notesModal .modal-dialog {
    position: fixed !important;
    top: 80px !important;
    left: 50% !important;
    transform: translateX(-50%) !important;
    margin: 0 !important;
    width: 90% !important;
    max-width: 500px !important;
    z-index: 10060 !important;
}

#notesModal .modal-content {
    background: white !important;
    border-radius: 16px;
    border: none;
    box-shadow: 0 20px 25px -5px rgb(0 0 0 / 0.3);
    position: relative;
    z-index: 10070 !important;
}

#notesModal .modal-header {
    background: linear-gradient(135deg, #A3BDD9, #7C9CBF);
    color: white;
    padding: 1.25rem 1.5rem;
    border: none;
}

#notesModal .modal-title {
    font-weight: 600;
}

#notesModal .modal-body {
    padding: 1.5rem;
    background: white;
}

#notesModal .modal-footer {
    padding: 1rem 1.5rem;
    border: none;
    background: #FAFBFD;
}

#notesModal .modal-body textarea {
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid #F7F9FC;
    width: 100%;
    min-height: 150px;
}

    #notesModal .modal-body textarea:focus {
        border-color: #A3BDD9;
        box-shadow: 0 0 0 0.25rem rgba(124, 156, 191, 0.15);
        outline: none;
    }

#notesModal .btn-close {
    background: white;
    opacity: 0.8;
}

    #notesModal .btn-close:hover {
        opacity: 1;
    }

/* Responsive */
@media (max-width: 768px) {
    #notesModal .modal-dialog {
        top: 60px !important;
        width: 95% !important;
    }
}

@media (max-width: 576px) {
    #notesModal .modal-dialog {
        top: 50px !important;
    }

    #notesModal .modal-body textarea {
        min-height: 120px;
    }
}

/* ====================
   BIBLE VERSES
   ==================== */
.verse-text {
    font-family: var(--font-serif);
    font-size: 1.15rem;
    line-height: 1.9;
    color: var(--dark);
    letter-spacing: 0.01em;
}

.verse-number {
    display: inline-block;
    min-width: 2rem;
    font-weight: 600;
    color: var(--primary);
    margin-right: 0.5rem;
    font-size: 0.9rem;
}

.verse-content {
    font-size: 1.1rem;
    line-height: 1.8;
}

.notes-content {
    font-size: 0.95rem;
    line-height: 1.6;
    white-space: pre-wrap;
}

/* ====================
   FAVORITE BUTTON
   ==================== */
.favorite-btn {
    background: transparent;
    border: 2px solid var(--accent);
    color: var(--accent);
    padding: 0.4rem 0.8rem;
    border-radius: 50px;
    transition: all 0.3s ease;
}

    .favorite-btn:hover {
        background: var(--accent);
        color: var(--white);
        transform: scale(1.05);
    }

    .favorite-btn.active {
        background: var(--accent);
        color: var(--white);
    }

.favorite-card {
    transition: all 0.3s ease;
}

    .favorite-card:hover {
        transform: translateY(-2px);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    }

/* ====================
   LIST GROUPS
   ==================== */
.list-group-item {
    border: none;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--lighter-gray);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

@media (max-width: 576px) {
    .list-group-item {
        margin-bottom: 0.25rem;
        padding: 0.5rem;
    }
}

.list-group-item:hover {
    background: var(--white);
    box-shadow: var(--shadow);
    transform: translateX(4px);
    border-left-color: var(--primary-light);
}

.list-group-item-warning {
    background: linear-gradient(90deg, rgba(232, 192, 125, 0.15), rgba(232, 192, 125, 0.05));
    border-left-color: var(--warning);
}

/* ====================
   BADGE
   ==================== */
.badge {
    border-radius: 8px;
    padding: 0.4em 0.8em;
    font-weight: 500;
}

.bg-primary {
    background: var(--primary) !important;
}


/* ====================
   FOOTER
   ==================== */
footer {
    background: linear-gradient(135deg, var(--dark), #2D3748);
    color: var(--white);
    padding: 3rem 0;
    margin-top: auto;
    box-shadow: var(--shadow-lg);
}

/* ====================
   RESPONSIVE
   ==================== */
@media (max-width: 768px) {
    .card {
        margin-bottom: 1rem;
    }

    h1 {
        font-size: 1.75rem;
    }

    .navbar-brand {
        font-size: 1.25rem;
    }

    .verse-text {
        font-size: 1rem;
    }

    #notesModal .modal-dialog {
        margin-top: 60px !important;
    }
}

@media (max-width: 576px) {
    .card-body {
        padding: 0;
    }
}

.verse-container {
    padding: 0.5rem 0;
    border-radius: 8px;
    transition: all 0.3s ease;
}

    .verse-container:hover {
        background: linear-gradient(to right, rgba(79, 70, 229, 0.05), transparent);
        transform: translateX(4px);
    }

.verse-number {
    color: #6366f1;
    font-weight: 600;
    min-width: 2.5rem;
    font-size: 0.9rem;
    opacity: 0.8;
}

.verse-text {
    cursor: pointer;
    line-height: 1.8;
    color: #1f2937;
    position: relative;
    transition: color 0.2s ease;
}

    .verse-text:hover {
        color: #4f46e5;
    }

    .verse-text::after {
        content: '📋';
        position: absolute;
        right: -25px;
        top: 0;
        opacity: 0;
        transition: opacity 0.2s ease;
        font-size: 0.9em;
    }

.verse-container:hover .verse-text::after {
    opacity: 0.5;
}

.favorite-btn {
    color: #9ca3af;
    padding: 0.25rem 0.5rem;
    border: none;
    background: transparent;
    transition: all 0.3s ease;
    text-decoration: none !important;
}

    .favorite-btn:hover {
        color: #ef4444;
        transform: scale(1.2);
    }

    .favorite-btn.active {
        color: #ef4444;
    }

        .favorite-btn.active i {
            animation: heartbeat 0.5s ease;
        }

@keyframes heartbeat {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.3);
    }

    100% {
        transform: scale(1);
    }
}

/* Copy indicator */
.copy-indicator {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(16, 185, 129, 0.95);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    z-index: 10000;
    animation: fadeInOut 1s ease;
    pointer-events: none;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
}

@keyframes fadeInOut {
    0% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.8);
    }

    50% {
        opacity: 1;
        transform: translate(-50%, -50%) scale(1);
    }

    100% {
        opacity: 0;
        transform: translate(-50%, -50%) scale(0.9);
    }
}

/* Floating notification */
.floating-notification {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: white;
    color: #1f2937;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    animation: slideUp 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 250px;
}

    .floating-notification.success {
        border-left: 4px solid #10b981;
    }

    .floating-notification.error {
        border-left: 4px solid #ef4444;
    }

@keyframes slideUp {
    from {
        transform: translateY(100px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

@keyframes slideDown {
    from {
        transform: translateY(0);
        opacity: 1;
    }

    to {
        transform: translateY(100px);
        opacity: 0;
    }
}

.sticky-sidebar {
    position: sticky;
    top: 80px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
}

.section-header {
    position: sticky;
    top: 0;
    z-index: 10;
}

.benefit-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

    .benefit-card:hover {
        transform: translateY(-5px);
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    }

.stat-box {
    transition: all 0.3s ease;
}

    .stat-box:hover {
        transform: scale(1.05);
        box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    }

.verse-card {
    transition: all 0.2s ease;
}

    .verse-card:hover {
        transform: translateX(5px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

.essential-verses {
    max-height: 500px;
    overflow-y: auto;
}

/* Grid Layout - 3 columns on desktop, 2 on tablet, 1 on mobile */
.books-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
}

.book-grid-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 12px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    text-decoration: none;
    color: #495057;
    background: white;
    transition: all 0.2s ease;
}

    /* Old Testament - Gray border */
    .book-grid-item:hover {
        border-color: #6c757d;
        background: #f8f9fa;
        transform: translateX(5px);
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }

/* New Testament - Green border */
.book-grid-item-nt {
    border-color: #d1e7dd;
}

    .book-grid-item-nt:hover {
        border-color: #198754;
        background: #d1e7dd;
    }

.book-name {
    font-weight: 600;
    font-size: 0.9rem;
}

.book-grid-item .badge {
    font-size: 0.75rem;
    padding: 4px 8px;
}



.section-header {
    position: sticky;
    top: 0;
    z-index: 10;
    border-bottom: 2px solid #dee2e6;
}

/* 현재 읽는 항목 강조 */
#proverbSection .reading-now {
    background: #fff7e6 !important;
    box-shadow: inset 4px 0 0 #ffa94d;
}

.btn-group.btn-group-sm {
    border-radius: 1.25rem; /* 원하는 라운드 정도 */
    overflow: hidden; /* 내부 버튼 radius 감추기 */
}

    .btn-group.btn-group-sm .btn {
        border-radius: 0 !important; /* 개별 버튼 radius 제거 */
    }

/* Responsive Design */
@media (max-width: 992px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 576px) {
    .books-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .book-name {
        font-size: 0.85rem;
    }
}
