/* Ancient Desert Codex Styles - Dune Aesthetic */

/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Cinzel', serif;
    line-height: 1.7;
    color: #2c1810;
    background: 
        radial-gradient(circle at 20% 50%, rgba(139, 89, 42, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(160, 111, 63, 0.1) 0%, transparent 50%),
        linear-gradient(135deg, #f4e9d1 0%, #e6d5b8 25%, #d4c5a0 50%, #c7b895 75%, #b8a482 100%);
    min-height: 100vh;
    position: relative;
    overflow-x: hidden;
}

/* Ancient papyrus texture overlay */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23b8925a' fill-opacity='0.03'%3E%3Cpath d='M30 30c0-6.627-5.373-12-12-12s-12 5.373-12 12 5.373 12 12 12 12-5.373 12-12zm12 0c0-6.627-5.373-12-12-12s-12 5.373-12 12 5.373 12 12 12 12-5.373 12-12z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E"),
        repeating-linear-gradient(45deg, transparent, transparent 35px, rgba(139, 89, 42, 0.02) 35px, rgba(139, 89, 42, 0.02) 70px);
    pointer-events: none;
    z-index: 1;
}

/* App Container */
.app-container {
    max-width: 100vw;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 2;
    background: rgba(244, 233, 209, 0.9);
    backdrop-filter: blur(1px);
    box-shadow: 
        inset 0 0 100px rgba(139, 89, 42, 0.1),
        0 0 50px rgba(0, 0, 0, 0.2);
}

/* Ancient Decorative Borders */
.ancient-border {
    position: fixed;
    background: 
        linear-gradient(45deg, #8b592a, #a06f3f, #8b592a),
        repeating-linear-gradient(90deg, transparent, transparent 10px, rgba(139, 89, 42, 0.3) 10px, rgba(139, 89, 42, 0.3) 12px);
    z-index: 10;
    opacity: 0.8;
}

.ancient-border.top, .ancient-border.bottom {
    left: 0;
    right: 0;
    height: 8px;
    background-size: 20px 8px, 12px 8px;
}

.ancient-border.left, .ancient-border.right {
    top: 0;
    bottom: 0;
    width: 8px;
    background-size: 8px 20px, 8px 12px;
}

.ancient-border.top { top: 0; }
.ancient-border.bottom { bottom: 0; }
.ancient-border.left { left: 0; }
.ancient-border.right { right: 0; }

/* Navigation Header */
.nav-header {
    background: 
        linear-gradient(135deg, rgba(139, 89, 42, 0.9) 0%, rgba(101, 67, 33, 0.9) 100%),
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23654321' fill-opacity='0.1'%3E%3Cpath d='M20 20c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10zm10 0c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10z'/%3E%3C/g%3E%3C/svg%3E");
    color: #f4e9d1;
    padding: 1rem 1.5rem;
    border-bottom: 3px solid #654321;
    box-shadow: 
        0 4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: sticky;
    top: 8px;
    z-index: 100;
    margin: 8px 8px 0 8px;
    border-radius: 0 0 8px 8px;
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 800px;
    margin: 0 auto;
}

.app-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.title-ornament {
    color: #d4af37;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

.nav-controls {
    display: flex;
    gap: 0.75rem;
}

.nav-button {
    background: 
        linear-gradient(145deg, rgba(160, 111, 63, 0.8), rgba(139, 89, 42, 0.8)),
        url("data:image/svg+xml,%3Csvg width='20' height='20' viewBox='0 0 20 20' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cpattern id='ancient-pattern' x='0' y='0' width='10' height='10' patternUnits='userSpaceOnUse'%3E%3Ccircle cx='5' cy='5' r='1' fill='%23654321' fill-opacity='0.1'/%3E%3C/pattern%3E%3C/defs%3E%3Crect width='20' height='20' fill='url(%23ancient-pattern)'/%3E%3C/svg%3E");
    border: 2px solid #654321;
    color: #f4e9d1;
    padding: 0.75rem 1rem;
    border-radius: 6px;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.1),
        0 2px 8px rgba(0, 0, 0, 0.2);
}

.nav-button:hover {
    background: linear-gradient(145deg, rgba(180, 131, 83, 0.9), rgba(160, 111, 63, 0.9));
    transform: translateY(-1px);
    box-shadow: 
        inset 0 1px 0 rgba(255, 255, 255, 0.2),
        0 4px 12px rgba(0, 0, 0, 0.3);
}

.button-ornament {
    color: #d4af37;
    font-size: 0.8rem;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

/* Modal Styles - FIXED CENTERING */
.modal-overlay {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    width: 100vw;
    height: 100vh;
    background: 
        radial-gradient(circle, rgba(60, 47, 31, 0.9) 0%, rgba(39, 30, 20, 0.95) 100%),
        url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23654321' fill-opacity='0.03'%3E%3Cpath d='M50 50c0-13.807-11.193-25-25-25S0 36.193 0 50s11.193 25 25 25 25-11.193 25-25zm25 0c0-13.807-11.193-25-25-25s-25 11.193-25 25 11.193 25 25 25 25-11.193 25-25z'/%3E%3C/g%3E%3C/svg%3E");
    backdrop-filter: blur(12px);
    display: flex !important;
    align-items: center;
    justify-content: center;
    z-index: 10000 !important;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    padding: 2rem;
    margin: 0;
    overflow: auto;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: 
        linear-gradient(145deg, #f4e9d1 0%, #e6d5b8 100%),
        url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%238b592a' fill-opacity='0.02'%3E%3Cpath d='M40 40c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20zm20 0c0-11.046-8.954-20-20-20s-20 8.954-20 20 8.954 20 20 20 20-8.954 20-20z'/%3E%3C/g%3E%3C/svg%3E");
    border: 3px solid #8b592a;
    border-radius: 12px;
    width: 100%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 
        0 20px 60px rgba(0, 0, 0, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.4s ease;
    position: relative;
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

/* Modal Pulse Animation */
@keyframes modalPulse {
    0% { 
        transform: scale(0.98); 
        opacity: 0.9; 
    }
    50% { 
        transform: scale(1.01); 
        opacity: 1; 
        box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
    }
    100% { 
        transform: scale(1); 
        opacity: 1; 
    }
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background: 
        linear-gradient(135deg, rgba(139, 89, 42, 0.9) 0%, rgba(101, 67, 33, 0.9) 100%);
    color: #f4e9d1;
    border-radius: 9px 9px 0 0;
    border-bottom: 2px solid #654321;
}

.modal-header h2 {
    font-family: 'Cinzel Decorative', serif;
    font-size: 1.3rem;
    font-weight: 600;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-ornament {
    color: #d4af37;
    font-size: 1rem;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.close-modal {
    background: none;
    border: none;
    color: #f4e9d1;
    font-size: 1.8rem;
    cursor: pointer;
    padding: 0.25rem;
    border-radius: 4px;
    transition: all 0.2s ease;
    font-family: 'Cinzel', serif;
    font-weight: bold;
}

.close-modal:hover {
    background: rgba(255, 255, 255, 0.2);
    color: #d4af37;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

/* Book Grid */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
    padding: 2rem;
}

.book-item {
    background: 
        linear-gradient(145deg, #a06f3f 0%, #8b592a 100%),
        url("data:image/svg+xml,%3Csvg width='30' height='30' viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23654321' fill-opacity='0.1'%3E%3Cpath d='M15 15c0-4.142-3.358-7.5-7.5-7.5S0 10.858 0 15s3.358 7.5 7.5 7.5S15 19.142 15 7.5zm7.5 0c0-4.142-3.358-7.5-7.5-7.5s-7.5 3.358-7.5 7.5 3.358 7.5 7.5 7.5 7.5-3.358 7.5-7.5z'/%3E%3C/g%3E%3C/svg%3E");
    color: #f4e9d1;
    border: 2px solid #654321;
    border-radius: 8px;
    padding: 1.2rem 1rem;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: relative;
}

.book-item::before {
    content: '◊';
    position: absolute;
    top: 8px;
    left: 8px;
    color: #d4af37;
    font-size: 0.8rem;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

.book-item:hover {
    background: linear-gradient(145deg, #b87f4f 0%, #a06f3f 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.3),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

/* Chapter Grid */
.chapter-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
    gap: 0.75rem;
    padding: 2rem;
}

.chapter-item {
    background: 
        linear-gradient(145deg, #e6d5b8 0%, #d4c5a0 100%);
    border: 2px solid #8b592a;
    border-radius: 6px;
    padding: 1rem 0.5rem;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    color: #2c1810;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.chapter-item:hover {
    background: linear-gradient(145deg, #a06f3f 0%, #8b592a 100%);
    color: #f4e9d1;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    transform: translateY(-1px);
    box-shadow: 
        0 4px 12px rgba(0, 0, 0, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

/* Reading Container */
.reading-container {
    flex: 1;
    overflow-y: auto;
    background: 
        linear-gradient(135deg, rgba(244, 233, 209, 0.95) 0%, rgba(230, 213, 184, 0.95) 100%);
    margin: 0 8px;
    border-radius: 8px;
    box-shadow: inset 0 0 30px rgba(139, 89, 42, 0.1);
}

.page-content {
    max-width: 700px;
    margin: 0 auto;
    padding: 3rem 2rem;
    min-height: calc(100vh - 140px);
}

/* Loading State */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    color: #654321;
    font-weight: 500;
}

.ancient-spinner {
    position: relative;
    width: 60px;
    height: 60px;
    margin-bottom: 2rem;
}

.spinner-ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 3px solid transparent;
    border-top: 3px solid #8b592a;
    border-radius: 50%;
    animation: ancientSpin 2s linear infinite;
}

.spinner-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #d4af37;
    font-size: 1.5rem;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.5);
}

@keyframes ancientSpin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Chapter Content */
.chapter {
    margin-bottom: 3rem;
    animation: fadeInAncient 0.8s ease;
}

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

.chapter-title {
    font-family: 'Cinzel Decorative', serif;
    font-size: 2.5rem;
    font-weight: 600;
    color: #4a2c1a;
    margin-bottom: 2.5rem;
    text-align: center;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
}

.chapter-title::before,
.chapter-title::after {
    content: '◊ ◊ ◊';
    position: absolute;
    color: #d4af37;
    font-size: 0.4em;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.3);
}

.chapter-title::before {
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.chapter-title::after {
    bottom: -20px;
    left: 50%;
    transform: translateX(-50%);
}

.verse {
    margin-bottom: 1.5rem;
    font-size: 1.2rem;
    line-height: 1.8;
    color: #2c1810;
    transition: all 0.3s ease;
    text-align: justify;
    text-indent: 1em;
    position: relative;
    font-weight: 400;
}

.verse:hover {
    background: 
        linear-gradient(90deg, rgba(139, 89, 42, 0.1) 0%, transparent 100%);
    padding: 1rem 1rem 1rem 2rem;
    border-radius: 8px;
    border-left: 4px solid #d4af37;
    margin-left: -1rem;
    box-shadow: 0 2px 8px rgba(139, 89, 42, 0.1);
}

.verse-number {
    color: #654321;
    font-weight: 600;
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    margin-right: 0.5rem;
    background: 
        linear-gradient(145deg, rgba(212, 175, 55, 0.2), rgba(160, 111, 63, 0.2));
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    display: inline-block;
    min-width: 2rem;
    text-align: center;
    border: 1px solid rgba(139, 89, 42, 0.3);
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 1px 3px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

/* Bottom Navigation */
.bottom-nav {
    background: 
        linear-gradient(135deg, rgba(139, 89, 42, 0.9) 0%, rgba(101, 67, 33, 0.9) 100%),
        url("data:image/svg+xml,%3Csvg width='40' height='40' viewBox='0 0 40 40' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='%23654321' fill-opacity='0.1'%3E%3Cpath d='M20 20c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10zm10 0c0-5.5-4.5-10-10-10s-10 4.5-10 10 4.5 10 10 10 10-4.5 10-10z'/%3E%3C/g%3E%3C/svg%3E");
    padding: 1.5rem;
    border-top: 3px solid #654321;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-shadow: 
        0 -4px 20px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    position: sticky;
    bottom: 8px;
    margin: 0 8px 8px 8px;
    border-radius: 8px 8px 0 0;
}

.nav-arrow {
    background: 
        linear-gradient(145deg, #a06f3f 0%, #8b592a 100%);
    border: 2px solid #654321;
    color: #f4e9d1;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 
        0 4px 15px rgba(0, 0, 0, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    font-size: 1.2rem;
}

.nav-arrow:hover {
    background: linear-gradient(145deg, #b87f4f 0%, #a06f3f 100%);
    transform: translateY(-2px);
    box-shadow: 
        0 8px 25px rgba(0, 0, 0, 0.4),
        inset 0 2px 0 rgba(255, 255, 255, 0.2);
}

.nav-arrow:disabled {
    background: linear-gradient(145deg, #c7b895 0%, #b8a482 100%);
    color: #8b592a;
    cursor: not-allowed;
    transform: none;
    box-shadow: 
        0 2px 8px rgba(0, 0, 0, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.arrow-ornament {
    color: #d4af37;
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.5);
}

.progress-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
    max-width: 250px;
    margin: 0 2rem;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: 
        linear-gradient(90deg, rgba(139, 89, 42, 0.3) 0%, rgba(101, 67, 33, 0.3) 100%);
    border: 1px solid #654321;
    border-radius: 4px;
    overflow: hidden;
    position: relative;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.2);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37 0%, #b8925a 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
    width: 0%;
    box-shadow: 
        0 0 8px rgba(212, 175, 55, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.progress-ornaments {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    gap: 2rem;
    pointer-events: none;
}

.progress-symbol {
    color: #d4af37;
    font-size: 0.6rem;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
    opacity: 0.7;
}

.verse-counter {
    font-family: 'Cinzel', serif;
    font-size: 1rem;
    color: #f4e9d1;
    font-weight: 500;
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
    background: rgba(0, 0, 0, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 6px;
    border: 1px solid rgba(101, 67, 33, 0.5);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

/* Verse Highlighting Styles - FIXED CONTRAST */
.verse.highlighted {
    background: 
        linear-gradient(90deg, rgba(212, 175, 55, 0.15) 0%, rgba(212, 175, 55, 0.08) 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border-left: 6px solid #d4af37;
    margin: 1rem 0;
    box-shadow: 
        0 4px 16px rgba(212, 175, 55, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    color: #1a1008;
    font-weight: 500;
}

.verse.highlighted::before {
    content: '◊';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    color: #d4af37;
    font-size: 1.2rem;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.7);
    background: #f4e9d1;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 2px solid #d4af37;
}

/* Enhanced verse styles with sharing functionality */
.verse:hover .verse-share-btn {
    opacity: 1;
    visibility: visible;
}

.verse-share-btn {
    position: absolute;
    right: 0.5rem;
    top: 0.5rem;
    background: linear-gradient(145deg, #d4af37 0%, #b8925a 100%);
    border: none;
    color: #2c1810;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.9rem;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    z-index: 10;
}

.verse-share-btn:hover {
    background: linear-gradient(145deg, #f4d03b 0%, #d4af37 100%);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.verse-share-btn:active {
    transform: scale(0.95);
}

/* Share notification */
.share-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(145deg, #4a2c1a 0%, #654321 100%);
    color: #f4e9d1;
    padding: 1rem 2rem;
    border-radius: 8px;
    font-family: 'Cinzel', serif;
    font-size: 0.9rem;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    opacity: 0;
    visibility: hidden;
    transition: all 0.4s ease;
    border: 2px solid #d4af37;
}

.share-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(-10px);
}

.share-notification::before {
    content: '🔗';
    margin-right: 0.5rem;
    font-size: 1.1rem;
}

/* Linked verse (when arriving from URL) */
.verse.linked {
    background: 
        linear-gradient(90deg, rgba(212, 175, 55, 0.2) 0%, rgba(212, 175, 55, 0.1) 100%);
    padding: 1.5rem;
    border-radius: 12px;
    border: 2px solid #d4af37;
    margin: 1rem 0;
    box-shadow: 
        0 6px 20px rgba(212, 175, 55, 0.3),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    position: relative;
    animation: verseLink 2s ease;
    color: #1a1008;
    font-weight: 500;
}

@keyframes verseLink {
    0% { 
        box-shadow: 0 0 0 rgba(212, 175, 55, 0.5);
        transform: scale(1);
    }
    50% { 
        box-shadow: 0 0 30px rgba(212, 175, 55, 0.7);
        transform: scale(1.02);
    }
    100% { 
        box-shadow: 0 6px 20px rgba(212, 175, 55, 0.3);
        transform: scale(1);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .ancient-border {
        display: none;
    }
    
    .nav-header, .bottom-nav {
        margin: 0;
        border-radius: 0;
    }
    
    .reading-container {
        margin: 0;
        border-radius: 0;
    }
    
    .nav-content {
        padding: 0;
    }
    
    .app-title {
        font-size: 1.4rem;
    }
    
    .nav-button {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
    
    .page-content {
        padding: 2rem 1.5rem;
    }
    
    .chapter-title {
        font-size: 2rem;
    }
    
    .verse {
        font-size: 1.1rem;
    }
    
    .book-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .modal-content {
        margin: 1rem;
    }
    
    .progress-indicator {
        margin: 0 1rem;
    }

    /* Mobile modal fix */
    .modal-overlay {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .nav-controls {
        gap: 0.5rem;
    }
    
    .nav-button {
        padding: 0.5rem 0.6rem;
        font-size: 0.8rem;
    }
    
    .nav-button span:not(.button-ornament) {
        display: none;
    }
    
    .nav-button::before {
        content: attr(data-short);
    }
    
    .page-content {
        padding: 1.5rem 1rem;
    }
    
    .chapter-title {
        font-size: 1.8rem;
    }
    
    .verse {
        font-size: 1rem;
        text-indent: 0;
    }
    
    .nav-arrow {
        width: 48px;
        height: 48px;
        font-size: 1rem;
    }
    
    .app-title {
        font-size: 1.2rem;
    }
    
    .title-ornament {
        display: none;
    }
}

/* Dark Desert Mode (Evening/Night) */
@media (prefers-color-scheme: dark) {
    body {
        background: 
            radial-gradient(circle at 20% 50%, rgba(69, 44, 22, 0.2) 0%, transparent 50%),
            radial-gradient(circle at 80% 20%, rgba(80, 55, 31, 0.2) 0%, transparent 50%),
            linear-gradient(135deg, #2a1f15 0%, #3c2f1f 25%, #4a3626 50%, #3c2f1f 75%, #2a1f15 100%);
        color: #e6d5b8;
    }
    
    .app-container {
        background: rgba(42, 31, 21, 0.95);
    }
    
    .reading-container {
        background: linear-gradient(135deg, rgba(42, 31, 21, 0.98) 0%, rgba(60, 47, 31, 0.98) 100%);
    }
    
    .verse {
        color: #e6d5b8;
    }
    
    .chapter-title {
        color: #d4c5a0;
    }
    
    .modal-content {
        background: linear-gradient(145deg, #3c2f1f 0%, #2a1f15 100%);
        color: #e6d5b8;
    }
    
    .chapter-item {
        background: linear-gradient(145deg, #4a3626 0%, #3c2f1f 100%);
        color: #e6d5b8;
        border-color: #654321;
    }

    .loading-state {
        color: #b8925a;
    }
}

/* Print styles */
@media print {
    .nav-header,
    .bottom-nav,
    .modal-overlay,
    .ancient-border {
        display: none;
    }
    
    body {
        background: #f4e9d1;
    }
    
    .page-content {
        margin: 0;
        padding: 0;
        max-width: none;
    }
    
    .verse {
        page-break-inside: avoid;
        color: #2c1810;
    }
    
    .chapter-title {
        color: #654321;
    }
} 