:root {
    --primary: #d4af37;
    --accent: #8b5cf6;
    --copper: #c87d4a;
    --bg-dark: #0c0a10;
    --text-light: #F3F1ED;
    --parchment: #f5f0e8;
    --glass-bg: rgba(12, 10, 16, 0.75);
    --glass-border: rgba(212, 175, 55, 0.25);
    --deep-purple: #1a0f2e;
    --burgundy: #6b0f1a;
}

::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 10px; }
::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.5); border-radius: 10px; border: 1px solid rgba(255, 255, 255, 0.1); }
::-webkit-scrollbar-thumb:hover { background: rgba(212, 175, 55, 0.7); }
* { scrollbar-width: thin; scrollbar-color: var(--primary) rgba(0, 0, 0, 0.1); }

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

body {
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    min-height: 100vh;
    overflow-x: hidden;
}

#bgCanvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Header */
.glass-header {
    text-align: center;
    padding: 15px 20px;
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    z-index: 10;
}

.glass-header h1 {
    font-size: 1.8rem;
    color: var(--primary);
    text-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
    margin-bottom: 5px;
}

.glass-header p {
    font-size: 0.9rem;
    color: var(--parchment);
    opacity: 0.8;
}

/* Main Content */
.main-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px 100px;
    position: relative;
    z-index: 1;
}

/* Daily Verse Card */
.daily-verse-card {
    background: linear-gradient(135deg, rgba(12, 10, 16, 0.9), rgba(26, 15, 46, 0.8));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    margin-bottom: 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
}

.daily-verse-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.1) 0%, transparent 70%);
    animation: verseGlow 8s ease-in-out infinite;
}

@keyframes verseGlow {
    0%, 100% { transform: translate(0, 0); }
    50% { transform: translate(10%, 10%); }
}

.verse-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.verse-text {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--parchment);
    line-height: 1.6;
    margin-bottom: 10px;
    position: relative;
    z-index: 1;
}

.verse-ref {
    font-size: 0.9rem;
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 15px;
    position: relative;
    z-index: 1;
}

.verse-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    position: relative;
    z-index: 1;
}

.verse-action-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    cursor: pointer;
    transition: all 0.3s;
    color: var(--text-light);
}

.verse-action-btn:hover {
    background: rgba(212, 175, 55, 0.25);
    border-color: var(--primary);
    transform: scale(1.1);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* Feature Tabs */
.feature-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
    padding: 10px;
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
}

.tab-btn {
    padding: 8px 14px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 0.85rem;
    font-family: inherit;
}

.tab-btn:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.tab-btn.active {
    background: linear-gradient(45deg, rgba(212, 175, 55, 0.3), rgba(140, 82, 255, 0.2));
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

/* Feature Content */
.feature-content {
    background: var(--glass-bg);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 25px;
    min-height: 300px;
}

.feature-content h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-align: center;
}

.feature-content h4 {
    color: var(--copper);
    margin: 15px 0 10px;
    font-size: 1.1rem;
}

.feature-content p {
    line-height: 1.6;
    margin-bottom: 10px;
}

/* Form Elements */
.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    color: var(--parchment);
    font-size: 0.9rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.95rem;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.form-group select option {
    background-color: var(--bg-dark);
    color: var(--text-light);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.form-row .form-group {
    flex: 1;
    margin-bottom: 0;
}

/* Action Buttons */
.action-btn {
    display: block;
    width: 100%;
    padding: 12px;
    background: linear-gradient(45deg, var(--burgundy), var(--deep-purple));
    color: var(--text-light);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    margin-top: 10px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(107, 15, 26, 0.4);
}

.action-btn.secondary {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.action-btn.secondary:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: var(--primary);
}

/* Result Display */
.result-display {
    background: rgba(26, 15, 46, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 20px;
    margin-top: 15px;
    line-height: 1.7;
    text-align: left;
}

.result-display b {
    color: var(--primary);
}

.result-display h4 {
    color: var(--copper);
    margin: 15px 0 10px;
}

/* Verse Card in Library */
.verse-card {
    background: rgba(26, 15, 46, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.verse-card:hover {
    border-color: var(--primary);
    background: rgba(26, 15, 46, 0.6);
}

.verse-card .verse-ref {
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 5px;
}

.verse-card .verse-text {
    font-style: italic;
    color: var(--parchment);
}

/* Book Grid */
.book-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 10px;
    margin-top: 15px;
}

.book-card {
    background: rgba(26, 15, 46, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s;
}

.book-card:hover {
    border-color: var(--primary);
    transform: translateY(-2px);
}

.book-card .book-name {
    color: var(--primary);
    font-weight: bold;
    font-size: 0.85rem;
}

.book-card .book-chapters {
    color: var(--parchment);
    opacity: 0.6;
    font-size: 0.75rem;
    margin-top: 3px;
}

/* Quiz */
.quiz-question {
    background: rgba(26, 15, 46, 0.5);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
}

.quiz-question p {
    font-size: 1.1rem;
    margin-bottom: 15px;
    color: var(--parchment);
}

.quiz-options {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quiz-option {
    padding: 10px 15px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: left;
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.95rem;
}

.quiz-option:hover {
    background: rgba(212, 175, 55, 0.1);
    border-color: var(--primary);
}

.quiz-option.correct {
    background: rgba(34, 139, 34, 0.3);
    border-color: #228b22;
}

.quiz-option.wrong {
    background: rgba(178, 34, 34, 0.3);
    border-color: #b22222;
}

.quiz-score {
    text-align: center;
    padding: 20px;
    background: rgba(26, 15, 46, 0.5);
    border-radius: 10px;
    margin-top: 15px;
}

.quiz-score .score-number {
    font-size: 2rem;
    color: var(--primary);
    font-weight: bold;
}

/* Atlas Map */
#atlas-map {
    width: 100%;
    height: 500px;
    border-radius: 10px;
    margin-bottom: 15px;
    z-index: 0;
}

#atlas-map .leaflet-container {
    border-radius: 10px;
    background: #1a0f2e;
}

#atlas-map .leaflet-popup-content-wrapper {
    background: rgba(12, 10, 16, 0.95);
    color: var(--text-light);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
}

#atlas-map .leaflet-popup-tip {
    background: rgba(12, 10, 16, 0.95);
}

#atlas-map .leaflet-popup-content {
    font-family: inherit;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Character Card */
.character-card {
    background: rgba(26, 15, 46, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
}

.character-card .char-name {
    color: var(--primary);
    font-weight: bold;
    font-size: 1.1rem;
    margin-bottom: 5px;
}

.character-card .char-info {
    color: var(--parchment);
    font-size: 0.9rem;
    opacity: 0.8;
}

/* Promise Card */
.promise-card {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.1), rgba(26, 15, 46, 0.5));
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
}

.promise-card .promise-category {
    color: var(--copper);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 5px;
}

.promise-card .promise-verse {
    color: var(--primary);
    font-weight: bold;
    margin-bottom: 5px;
}

.promise-card .promise-text {
    color: var(--parchment);
    font-style: italic;
}

/* Prayer Journal */
.journal-entry {
    background: rgba(26, 15, 46, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
}

.journal-entry .journal-date {
    color: var(--copper);
    font-size: 0.8rem;
    margin-bottom: 5px;
}

.journal-entry .journal-prayer {
    color: var(--parchment);
    line-height: 1.5;
}

.journal-entry .journal-verse {
    color: var(--primary);
    font-size: 0.85rem;
    margin-top: 5px;
    font-style: italic;
}

/* Favorites */
.favorite-item {
    background: rgba(26, 15, 46, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.favorite-item .fav-verse {
    flex: 1;
}

.favorite-item .fav-ref {
    color: var(--primary);
    font-weight: bold;
    font-size: 0.85rem;
}

.favorite-item .fav-text {
    color: var(--parchment);
    font-style: italic;
    font-size: 0.9rem;
}

.favorite-item .fav-actions {
    display: flex;
    gap: 5px;
}

.fav-remove-btn {
    background: none;
    border: none;
    color: #b22222;
    cursor: pointer;
    font-size: 16px;
    padding: 5px;
    transition: all 0.3s;
}

.fav-remove-btn:hover {
    color: #ff4444;
    transform: scale(1.2);
}

/* History */
.history-item {
    background: rgba(26, 15, 46, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.3s;
}

.history-item:hover {
    border-color: var(--primary);
}

.history-item .history-title {
    color: var(--primary);
    font-weight: bold;
    font-size: 0.95rem;
}

.history-item .history-date {
    color: var(--parchment);
    opacity: 0.6;
    font-size: 0.75rem;
    margin-top: 3px;
}

/* Reading Plan */
.plan-selector {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.plan-btn {
    padding: 8px 16px;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s;
    font-family: inherit;
    font-size: 0.9rem;
}

.plan-btn.active {
    background: rgba(212, 175, 55, 0.3);
    border-color: var(--primary);
    color: var(--primary);
}

.plan-progress {
    background: rgba(26, 15, 46, 0.5);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
}

.plan-progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 10px;
}

.plan-progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--copper));
    border-radius: 4px;
    transition: width 0.3s;
}

.plan-day {
    background: rgba(26, 15, 46, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    padding: 12px;
    margin-bottom: 8px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.plan-day.completed {
    border-color: #228b22;
    background: rgba(34, 139, 34, 0.1);
}

.plan-day .day-label {
    color: var(--primary);
    font-weight: bold;
}

.plan-day .day-reading {
    color: var(--parchment);
    font-size: 0.9rem;
}

.plan-day .day-check {
    color: #228b22;
    font-size: 18px;
}

/* Prophecy Card */
.prophecy-card {
    background: rgba(26, 15, 46, 0.4);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
}

.prophecy-card .prophecy-theme {
    color: var(--copper);
    font-size: 0.8rem;
    text-transform: uppercase;
    margin-bottom: 8px;
}

.prophecy-card .prophecy-row {
    display: flex;
    gap: 15px;
    margin-bottom: 5px;
}

.prophecy-card .prophecy-label {
    color: var(--primary);
    font-weight: bold;
    min-width: 80px;
}

.prophecy-card .prophecy-ref {
    color: var(--parchment);
}

/* Narrator */
/* Popup */
.popup {
    display: none;
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(12, 10, 16, 0.92);
    padding: 30px;
    padding-top: 45px;
    border-radius: 12px;
    box-shadow: 0 0 40px rgba(0, 0, 0, 0.8), 0 0 30px rgba(212, 175, 55, 0.15);
    z-index: 2000;
    color: var(--text-light);
    max-width: 85%;
    width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
}

.popup.show {
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: fadeIn 0.3s;
}

.popup h3 {
    color: var(--primary);
    margin-bottom: 15px;
    font-size: 1.3rem;
    text-align: center;
}

.popup .close-popup {
    position: absolute;
    top: 12px;
    right: 12px;
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s;
}

.popup .close-popup:hover {
    color: var(--primary);
    transform: scale(1.2);
}

.popup-link {
    display: block;
    margin: 10px auto 0;
    padding: 10px 20px;
    background: linear-gradient(45deg, var(--burgundy), var(--deep-purple));
    color: var(--text-light);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    text-align: center;
    font-family: inherit;
    font-size: 0.9rem;
    width: fit-content;
}

.popup-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(107, 15, 26, 0.4);
}

.speak-btn.speaking {
    background: rgba(212, 175, 55, 0.3) !important;
    border-color: var(--primary) !important;
}

/* Spinner */
.spinner-wrap { text-align: center; padding: 20px; }
.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(212, 175, 55, 0.1);
    border-top: 3px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 10px auto;
}

@keyframes spin { 100% { transform: rotate(360deg); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Alert Modal */
.popup.alert-modal {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    transform: none !important;
    margin: auto;
    max-width: 90%;
}

/* Plan Modal */
.plan-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.65);
    z-index: 1999;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: fadeIn 0.2s;
}

.plan-modal-inner {
    width: 90%;
    max-width: 720px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    padding: 30px;
    padding-top: 45px;
}

.plan-modal-refs {
    text-align: center;
    color: var(--copper);
    font-size: 0.85rem;
    margin-bottom: 12px;
    font-style: italic;
}

.plan-modal-content {
    flex: 1;
    overflow-y: auto;
    min-height: 80px;
    padding: 5px 0;
}

.plan-modal-content::-webkit-scrollbar {
    width: 4px;
}

.plan-modal-content::-webkit-scrollbar-thumb {
    background: var(--copper);
    border-radius: 2px;
}

.plan-modal-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 30px;
    color: var(--parchment);
}

.plan-modal-book {
    margin-bottom: 18px;
}

.plan-modal-book-title {
    color: var(--primary);
    font-size: 1.05rem;
    margin-bottom: 8px;
    padding-bottom: 5px;
    border-bottom: 1px solid var(--glass-border);
}

.plan-modal-verses {
    padding-left: 4px;
}

.plan-modal-footer {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
    padding-top: 12px;
    border-top: 1px solid var(--glass-border);
    margin-top: 8px;
}



.input-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.input-row > div {
    flex: 1;
    min-width: 0;
}

.input-row label {
    display: block;
    font-size: 0.8rem;
    color: var(--parchment);
    margin-bottom: 3px;
}

.input-row input {
    width: 100%;
    padding: 8px 10px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-light);
    font-family: inherit;
    font-size: 0.9rem;
}

.input-row input:focus {
    outline: none;
    border-color: var(--primary);
}

.mic-btn {
    background: rgba(212, 175, 55, 0.1);
    color: var(--text-light);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 3px 8px rgba(0, 0, 0, 0.3);
    transition: all 0.2s;
    flex-shrink: 0;
}

.mic-btn.listening {
    background: linear-gradient(45deg, #ff4d4d, #6b0f1a);
    transform: scale(1.05);
    box-shadow: 0 6px 18px rgba(107, 15, 26, 0.4);
}

.word-btn {
    padding: 10px;
    background: rgba(212, 175, 55, 0.1);
    color: white;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 5px;
    cursor: pointer;
    height: 42px;
    width: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    transition: all 0.3s;
    flex-shrink: 0;
}

.word-btn:hover {
    transform: scale(1.05);
    background: rgba(212, 175, 55, 0.25);
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.3);
}

/* Floating Menu */
.floating-menu {
    position: fixed;
    top: 2px;
    right: 2px;
    left: auto;
    background: rgba(12, 10, 16, 0.6);
    padding: 1px;
    border-radius: 5px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.5);
    cursor: move;
    z-index: 1000;
    user-select: none;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.2);
    width: 47px;
}

#home-btn, #jogo-btn, #profissionais-btn, #reset-btn, #help-btn, #pwa-btn {
    margin: 0;
    width: 44px;
    padding: 4px 0;
    font-size: 18px;
    background: rgba(255, 255, 255, 0.03);
    color: #F3F1ED;
    border: 1px solid rgba(212, 175, 55, 0.2);
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
}

#home-btn:hover, #jogo-btn:hover, #profissionais-btn:hover, #reset-btn:hover, #help-btn:hover, #pwa-btn:hover {
    transform: scale(1.1);
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.6);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.2);
}

.button-container {
    display: flex;
    flex-direction: column;
    gap: 2px;
    margin: 0;
    align-items: stretch;
    width: 47px;
}

.button-container button {
    position: relative;
}

.tooltip {
    visibility: hidden;
    position: absolute;
    z-index: 1;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background-color: rgba(26, 15, 46, 0.9);
    color: white;
    text-align: center;
    border-radius: 6px;
    padding: 5px 10px;
    opacity: 0;
    transition: opacity 0.3s;
    white-space: nowrap;
    font-size: 12px;
    pointer-events: none;
}

.button-container button:hover .tooltip {
    visibility: visible;
    opacity: 1;
}

.tooltip::after {
    content: "";
    position: absolute;
    top: 100%;
    left: 50%;
    margin-left: -5px;
    border-width: 5px;
    border-style: solid;
    border-color: rgba(26, 15, 46, 0.9) transparent transparent transparent;
}

/* Slightly smaller button container to match reduced menu */
.button-container {
    display: flex;
    flex-direction: column;
    gap: 0px;
    margin: 0;
    align-items: stretch;
    width: 47px;
}

/* Reduce button padding and font-size inside the floating menu for a more compact look */
.floating-menu .button-container button,
.floating-menu .button-container button span.tooltip {
    font-size: 15px;
}

.floating-menu .button-container button {
    padding: 3px 0;
    height: 36px;
}

.floating-menu::before {
    content: '⋮⋮';
    display: block;
    text-align: center;
    color: white;
    margin-bottom: 10px;
    font-size: 20px;
}

/* Responsive */
@media (max-width: 768px) {
    .form-row {
        flex-direction: column;
    }

    .feature-tabs {
        gap: 5px;
        padding: 8px;
    }

    .tab-btn {
        padding: 6px 10px;
        font-size: 0.75rem;
    }

    .feature-content {
        padding: 15px;
    }

    .glass-header h1 {
        font-size: 1.4rem;
    }

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

    .book-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .popup {
        width: 100%;
        max-width: none;
        height: 100%;
        top: 0;
        left: 0;
        transform: none;
        border-radius: 0;
        padding: 20px 10px;
        padding-top: 40px;
        justify-content: flex-start;
    }
}

@media (max-width: 480px) {
    .book-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .verse-text {
        font-size: 1rem;
    }

    .plan-selector {
        flex-direction: column;
    }
}

.chapter-content-wrap {
    background: rgba(12, 10, 16, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    padding: 20px;
    margin-top: 15px;
}

.chapter-title {
    color: var(--primary);
    font-size: 1.3rem;
    text-align: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--glass-border);
}

.source-note {
    text-align: center;
    font-size: 0.75rem;
    color: var(--copper);
    margin-bottom: 10px;
    font-style: italic;
}

.chapter-verses {
    max-height: 500px;
    overflow-y: auto;
    padding-right: 5px;
}

.chapter-verses::-webkit-scrollbar {
    width: 4px;
}

.chapter-verses::-webkit-scrollbar-thumb {
    background: var(--copper);
    border-radius: 2px;
}

.verse-line {
    display: flex;
    gap: 10px;
    padding: 4px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    line-height: 1.6;
}

.verse-line:last-child {
    border-bottom: none;
}

.verse-num {
    color: var(--primary);
    font-weight: bold;
    font-size: 0.8rem;
    min-width: 28px;
    text-align: right;
    flex-shrink: 0;
    padding-top: 2px;
}

.verse-text {
    color: var(--text-light);
    font-size: 0.95rem;
}

.chapter-reflection {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--glass-border);
    color: var(--parchment);
    font-size: 0.9rem;
    line-height: 1.7;
}
