  :root {
            --primary-color: #673AB7;
            --secondary-color: #422d67;
            --accent-color: #ff6b6b;
            --light-color: #422d67;
            --dark-color: #343a40;
            --text-color: #333;
            --bg-color: #ffffff;
            --card-bg: #f8f9fa;
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
            --transition: all 0.3s ease;
            --shadow-color: #eaba2a;
            --icon-bg: #673AB7;
            --border-color: #d2cddc;
            --font-color: #673AB7;
            --verse-play-color: #673AB7;
            --app-theme-color: #673AB7;
            --header-icon-color: #9a7bd1;
        }

        .dark-mode {
            --primary-color: #673AB7;
            --secondary-color: #422d67;
            --accent-color: #ff8e8e;
            --light-color: #422d67;
            --dark-color: #212529;
            --text-color: #cdc6dc;
            --bg-color: #121212;
            --card-bg: #1e1e1e;
            --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
            --shadow-color: #eaba2a;
            --icon-bg: #fff;
            --border-color: #483964;
            --font-color: #cdc6dc;
            --verse-play-color: #eaba2a;
            --app-theme-color: #0b0b0c;
            --header-icon-color: #1e1e1e;
        }
        
        html {
            font-size: clamp(15px, 1.2vw + 0.6rem, 20px);
        }

        .header-logo{
            width:150px;       
            border-radius: 5px;
        }
        .header-logo-tab{
            width:120px;       
            border-radius: 5px;
        }

        .loading {
            text-align: center;
            padding: 2em;
            color: #ccc;
        }
        

        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
        }

        body {
            background-color: var(--bg-color);
            color: var(--text-color);
            transition: var(--transition);
            padding-top: 70px;
            padding-bottom: 80px;
            min-height: 100vh;
        }

        /* Header Styles */
        header {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            background: linear-gradient(135deg, var(--app-theme-color), var(--app-theme-color));              
            color: white;           
            display: flex;
            justify-content: space-between;
            align-items: center;
            box-shadow: var(--shadow);
            z-index: 1000;
             backdrop-filter: blur(10px);
           /* padding: calc(18px + env(safe-area-inset-top)) 15px 18px 15px; */
            padding: calc(18px + env(safe-area-inset-top)) 10px 10px 10px;
        }

        .fa-arrow-left {
            color: #fff;
        }

        .logo {
            display: flex;
            align-items: center;
            gap: 10px;
            font-weight: 700;
            font-size: 1.5rem;
        }

        .logo i {
            font-size: 1.6rem;
        }

        .header-actions {
            display: flex;
            gap: 10px;
            align-items: center;
        }

        .header-action {
            background-color: var(--header-icon-color);
            width: 32px;
            height: 32px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: white;
            font-size: 20px;
        }

        .header-action:hover {
            background-color: #eaba2a;
        }

        .theme-toggle {
            background-color: var(--header-icon-color);
            width: 32px;
            height: 32px;
            border-radius: 12px;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            color: white;
            font-size: 20px;
        }

        .theme-toggle:hover {
            background-color: #eaba2a;
        }        

        .dark-mode .theme-toggle::after {
            left: calc(100% - 22px);
        }

        .back-icon {
            width: 36px;
            height: 36px;
            border-radius: 10px;    
            display: flex;
            align-items: center;
            justify-content: center;
            color: #fff;
            font-size: 1.2rem;
        }        

        .back-btn:hover{
            color: #eaba2a;
        }

        /* Bottom Navigation */
        .bottom-nav {
            position: fixed;
            bottom: 0;
            left: 0;
            width: 100%;
            background: linear-gradient(135deg, var(--app-theme-color), var(--app-theme-color));        
            display: flex;
            justify-content: space-around;
            padding: 15px 0;
            box-shadow: 0 -2px 10px rgba(0, 0, 0, 0.1);
            z-index: 1000;           
        }

        .nav-item {
            display: flex;
            flex-direction: column;
            align-items: center;
            color: #ffffff;
            text-decoration: none;
            font-size: 0.8rem;
            transition: var(--transition);
        }

        .nav-item.active {
            color: var(--shadow-color);
        }

        .nav-item i {
            font-size: 1.2rem;
            margin-bottom: 5px;
        }

        /* Main Content */
        .container {           
            padding: 20px;
            margin-top:30px;           
        }

        .page-title {
            margin: 20px 0;
            font-size: 1.2rem;
            font-weight: 700;
            color: var(--font-color);
            display: flex;
            align-items: center;
            gap: 10px;
        }

        .page-title i {
            font-size: 1.5rem;
        }

        /* Bible Navigation */
        .bible-navigation {
            display: flex;
            flex-wrap: wrap;
            gap: 15px;
            margin-bottom: 20px;
            background-color: var(--card-bg);
            padding: 15px;
            border-radius: 15px;
            box-shadow: var(--shadow);
        }

        .nav-select {
            flex: 1;
            min-width: 150px;
        }

        select {
            width: 100%;
            padding: 10px 15px;
            border-radius: 10px;
            border: 1px solid #673AB7;
            background-color: var(--bg-color);
            color: var(--text-color);
            font-size: 1rem;
            cursor: pointer;
        }

        .testament-tabs {
            display: flex;
            background-color: var(--light-color);
            border-radius: 10px;
            padding: 5px;
            margin-bottom: 20px;
            color:#fff;           
        }

        .testament-tab {
            flex: 1;
            padding: 10px 15px;
            text-align: center;
            border-radius: 8px;
            cursor: pointer;
            transition: var(--transition);
            font-weight: 600;
        }

        .testament-tab.active {
            background-color: var(--primary-color);
            color: white;
        }

        /* Books Grid */
        .books-section {
            margin-top: 20px;
        }

        .books-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
            gap: 15px;
            margin-top: 15px;
        }

        .book-card {
            background: var(--card-bg);
            border-radius: 10px;
            padding: 15px 10px;
            text-align: center;
            cursor: pointer;
            transition: var(--transition);           
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;    
            box-shadow: var(--shadow);                 
    
        }

        .book-card:hover {
            transform: translateY(-5px);
            /*background: var(--primary-color); */
            color: var(--icon-bg);
             box-shadow: inset 0 5px 25px #673AB7;      
        }

        .book-card.active {
            background: var(--primary-color);
            color: #eaba2a;
            box-shadow: inset 0 5px 25px #673AB7;   
        }

        .book-icon {
            font-size: 1.5rem;
            margin-bottom: 8px;
            color: var(--icon-bg);
        }

        .book-name {
            font-weight: 600;
            font-size: 0.9rem;
        }

        .book-name-telugu {
            font-family: 'Noto Sans Telugu', 'Segoe UI', sans-serif;
            font-size: 0.8rem;
            margin-top: 5px;
        }

        /* Chapters Grid */
        .chapters-section {
            margin-top: 30px;
        }

        .chapters-grid {
            display: grid;
            grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
            gap: 10px;
            margin-top: 15px;
        }

        .chapter-card {
            background-color: var(--card-bg);
            border-radius: 8px;
            padding: 12px 5px;
            text-align: center;
            cursor: pointer;
            transition: var(--transition);
            box-shadow: var(--shadow);
            font-weight: 600;
        }

        .chapter-card:hover {
            transform: translateY(-3px);
            background-color: var(--primary-color);
            color: white;
        }

        .chapter-card.active {
            background-color: var(--primary-color);
            color: white;
        }

        /* Bible Reader */
        .bible-reader {
            margin-top: 30px;
            background-color: var(--card-bg);
            border-radius: 15px;
            padding: 12px;           
            /*box-shadow: 0 5px 10px #673AB7; */           
            box-shadow: var(--shadow);
        }

        .reader-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
            padding-bottom: 15px;
            border: 1px solid var(--border-color);
        }

        .reader-title {
            font-size: 1.5rem;
            font-weight: 700;
            color: var(--font-color);
        }

        .reader-actions {
            display: flex;
            gap: 10px;
        }

        .action-btn {
            background-color: var(--light-color);
            border: none;
            width: 40px;
            height: 40px;
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            transition: var(--transition);
            color: #ffffff;
        }

        .action-btn:hover {
            background-color: var(--primary-color);
            color: white;
        }

        .bible-text {
            line-height: 1.8;
            font-size: 1rem;
            max-height: 400px;
            overflow-y: auto;
            padding: 5px;
        }

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

        .bible-text::-webkit-scrollbar-thumb {
            background: var(--primary-color);
            border-radius: 10px;
        }

        .verse {
            margin-bottom: 6px;
            padding: 10px;
            border-radius: 8px;
            transition: var(--transition);
        }

        .verse:hover {
            background-color: rgba(0,0,0,0.05);
        }

        .verse-number {
            font-weight: 700;
            color: var(--primary-color);
            margin-right: 5px;
        }

        .language-selector {
            display: flex;
            gap: 10px;
            margin-bottom: 10px;
        }

        .lang-btn {
            padding: 8px 20px;
            border-radius: 20px;
            border: 2px solid var(--primary-color);
            background: transparent;
            color: var(--primary-color);
            cursor: pointer;
            transition: var(--transition);
            font-weight: 600;
        }

        .lang-btn.active {
            background-color: var(--primary-color);
            color: white;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .books-grid {
                grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
            }
            
            .chapters-grid {
                grid-template-columns: repeat(auto-fill, minmax(45px, 1fr));
            }
            
            .bible-navigation {
                flex-direction: column;
            }
        }

        @media (max-width: 480px) {
            .books-grid {
                grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
            }
            
            .chapters-grid {
                grid-template-columns: repeat(auto-fill, minmax(40px, 1fr));
            }
            
            .reader-header {
                flex-direction: column;
                align-items: flex-start;
                gap: 15px;
            }
        }

        /* Telugu font */
        @import url('https://fonts.googleapis.com/css2?family=Noto+Sans+Telugu:wght@400;500;600;700&display=swap');
        
        .telugu-text {
            font-family: 'Noto Sans Telugu', 'Segoe UI', sans-serif;
            direction: ltr;
        }