html {
    height: 100%;
    margin: 0;
}

/* Bahá'í star styling - uses Noto Sans Symbols 2 font */
.bahai-star {
    font-family: "Noto Sans Symbols 2", sans-serif;
    font-size: 1em;
}

/* Theme system - Default white theme */
body {
    font-size: 1.3em;
    background-color: #ffffff;
    height: 100%;
    margin: 0;
    overflow-x: hidden;
    font-family: "Gentium", "DejaVu Sans", sans-serif;
    color: #333;
    transition: background-color 0.3s ease;
}

/* Warm Cream theme */
body[data-theme="cream"] {
    background-color: #faf8f3;
}

body[data-theme="cream"] #content {
    background-color: #faf8f3;
}

body[data-theme="cream"] .scripture {
    color: #2d2d2d;
}

body[data-theme="cream"] .favorite-prayer-card,
body[data-theme="cream"] .prayer-list-item,
body[data-theme="cream"] .simple-language-button {
    background-color: #f5f2eb;
}

body[data-theme="cream"] .filter-switch-container,
body[data-theme="cream"] .translations-switcher {
    background-color: #f5f2eb;
}

body[data-theme="cream"] .mdl-layout__header {
    background-color: #8b7355 !important;
}

/* Sky Blue theme */
body[data-theme="light-blue"] {
    background-color: #f0f7ff;
}

body[data-theme="light-blue"] #content {
    background-color: #f0f7ff;
}

body[data-theme="light-blue"] .scripture {
    color: #1a3a52;
}

body[data-theme="light-blue"] .favorite-prayer-card,
body[data-theme="light-blue"] .prayer-list-item,
body[data-theme="light-blue"] .simple-language-button {
    background-color: #e3f2fd;
}

body[data-theme="light-blue"] .filter-switch-container,
body[data-theme="light-blue"] .translations-switcher {
    background-color: #e3f2fd;
}

body[data-theme="light-blue"] .bahai-star {
    color: #1976d2;
}

body[data-theme="light-blue"] .mdl-layout__header {
    background-color: #1976d2 !important;
}

/* Soft Green theme */
body[data-theme="soft-green"] {
    background-color: #f4f9f4;
}

body[data-theme="soft-green"] #content {
    background-color: #f4f9f4;
}

body[data-theme="soft-green"] .scripture {
    color: #1b4332;
}

body[data-theme="soft-green"] .favorite-prayer-card,
body[data-theme="soft-green"] .prayer-list-item,
body[data-theme="soft-green"] .simple-language-button {
    background-color: #e8f5e9;
}

body[data-theme="soft-green"] .filter-switch-container,
body[data-theme="soft-green"] .translations-switcher {
    background-color: #e8f5e9;
}

body[data-theme="soft-green"] .bahai-star {
    color: #2e7d32;
}

body[data-theme="soft-green"] .mdl-layout__header {
    background-color: #2e7d32 !important;
}

/* Rose Garden theme */
body[data-theme="rose"] {
    background-color: #fff5f7;
}

body[data-theme="rose"] #content {
    background-color: #fff5f7;
}

body[data-theme="rose"] .scripture {
    color: #4a1e2c;
}

body[data-theme="rose"] .favorite-prayer-card,
body[data-theme="rose"] .prayer-list-item,
body[data-theme="rose"] .simple-language-button {
    background-color: #ffe4e9;
}

body[data-theme="rose"] .filter-switch-container,
body[data-theme="rose"] .translations-switcher {
    background-color: #ffe4e9;
}

body[data-theme="rose"] .bahai-star {
    color: #c2185b;
}

body[data-theme="rose"] .mdl-layout__header {
    background-color: #c2185b !important;
}

/* Lavender theme */
body[data-theme="lavender"] {
    background-color: #f8f5ff;
}

body[data-theme="lavender"] #content {
    background-color: #f8f5ff;
}

body[data-theme="lavender"] .scripture {
    color: #2d1b4e;
}

body[data-theme="lavender"] .favorite-prayer-card,
body[data-theme="lavender"] .prayer-list-item,
body[data-theme="lavender"] .simple-language-button {
    background-color: #ede7f6;
}

body[data-theme="lavender"] .filter-switch-container,
body[data-theme="lavender"] .translations-switcher {
    background-color: #ede7f6;
}

body[data-theme="lavender"] .bahai-star {
    color: #673ab7;
}

body[data-theme="lavender"] .mdl-layout__header {
    background-color: #673ab7 !important;
}

/* Dark theme */
body[data-theme="dark"] {
    background-color: #1a1a1a;
    color: #e0e0e0;
}

body[data-theme="dark"] #translations-menu-btn {
    color: #64b5f6 !important;
}

/* Ensure translation menu container works properly */
/* Translation switcher container */
.translation-switcher-container {
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

/* Language links styling */
.translation-links {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    align-items: center;
    max-width: 60vw;
    overflow-x: auto;
    padding: 4px 0;
}

/* Mobile responsive styling */
@media (max-width: 768px) {
    .translation-links {
        max-width: 75vw;
        gap: 4px;
    }

    .translation-link {
        font-size: 0.8em;
        padding: 3px 6px;
    }

    .translation-switcher-container {
        gap: 6px;
    }
}

@media (max-width: 480px) {
    .translation-links {
        max-width: 80vw;
        gap: 3px;
    }

    .translation-link {
        font-size: 0.75em;
        padding: 2px 5px;
    }
}

.translation-link {
    background-color: #f5f5f5;
    color: #333;
    text-decoration: none;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.85em;
    font-weight: 500;
    border: 1px solid #ddd;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.translation-link:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
    transform: translateY(-1px);
}

.translation-link.active {
    background-color: #3f51b5;
    color: white;
    border-color: #3f51b5;
}

/* Dark theme language links */
body[data-theme="dark"] .translation-link {
    background-color: #2a2a2a;
    color: #b0b0b0;
    border-color: #404040;
}

body[data-theme="dark"] .translation-link:hover {
    background-color: #404040;
    border-color: #555;
}

body[data-theme="dark"] .translation-link.active {
    background-color: #3f51b5;
    color: white;
    border-color: #3f51b5;
}

body[data-theme="dark"] #content {
    background-color: #1a1a1a;
}

body[data-theme="dark"] .scripture {
    color: #e0e0e0;
}

body[data-theme="dark"] .favorite-prayer-card,
body[data-theme="dark"] .prayer-list-item,
body[data-theme="dark"] .simple-language-button {
    background-color: #2a2a2a;
    border-color: #404040;
    color: #e0e0e0;
}

body[data-theme="dark"] .filter-switch-container,
body[data-theme="dark"] .translations-switcher {
    background-color: #2a2a2a;
}

body[data-theme="dark"] .bahai-star {
    color: #64b5f6;
}

body[data-theme="dark"] .mdl-layout__header {
    background-color: #212121 !important;
}

body[data-theme="dark"] h2,
body[data-theme="dark"] h3,
body[data-theme="dark"] #prayer-main-title {
    color: #e0e0e0;
}

body[data-theme="dark"] a {
    color: #64b5f6;
}

body[data-theme="dark"] .simple-language-button .language-name {
    color: #e0e0e0;
}

body[data-theme="dark"] .simple-language-button .language-code {
    color: #64b5f6;
}

body[data-theme="dark"] .simple-language-button .language-count {
    color: #808080;
}

body[data-theme="dark"] .random-prayer-card {
    background-color: #2a2a2a;
    border: 1px solid #404040;
}

body[data-theme="dark"] .random-prayer-card h4 {
    color: #64b5f6;
}

body[data-theme="dark"] .language-picker-tabs {
    border-top-color: #404040;
}

body[data-theme="dark"] .language-picker-tabs::before {
    color: #64b5f6;
}

body[data-theme="dark"]
    .language-picker-tabs
    .mdl-tabs__tab-bar
    .mdl-tabs__tab {
    background-color: transparent;
    border-color: #404040;
    color: #b0b0b0;
}

body[data-theme="dark"]
    .language-picker-tabs
    .mdl-tabs__tab-bar
    .mdl-tabs__tab:hover {
    background-color: #3a3a3a;
    border-color: #64b5f6;
}

body[data-theme="dark"]
    .language-picker-tabs
    .mdl-tabs__tab-bar
    .mdl-tabs__tab.is-active {
    background-color: #3f51b5;
    color: #ffffff;
    border-color: #3f51b5;
}

body[data-theme="dark"] .language-picker-tabs #all-languages-menu-btn {
    background-color: transparent;
    border-color: #404040;
    color: #b0b0b0;
}

body[data-theme="dark"] .language-picker-tabs #all-languages-menu-btn:hover {
    background-color: #3a3a3a;
    border-color: #64b5f6;
}

body[data-theme="dark"] .language-picker-tabs #refresh-language-cache-btn {
    background-color: transparent;
    border-color: #404040;
    color: #b0b0b0;
}

body[data-theme="dark"]
    .language-picker-tabs
    #refresh-language-cache-btn:hover {
    background-color: #3a3a3a;
    border-color: #64b5f6;
}

body[data-theme="dark"] .language-picker-tabs .mdl-menu {
    background-color: #2a2a2a !important;
    border-color: #404040;
}

body[data-theme="dark"] .language-picker-tabs .mdl-menu__item {
    background-color: transparent !important;
    color: #b0b0b0 !important;
}

body[data-theme="dark"] .language-picker-tabs .mdl-menu__item:hover {
    background-color: #3a3a3a !important;
}

body[data-theme="dark"]
    .language-picker-tabs
    #language-search-li
    .mdl-textfield__input {
    color: #b0b0b0;
}

body[data-theme="dark"]
    .language-picker-tabs
    #language-search-li
    .mdl-textfield__label {
    color: #808080;
}

/* Midnight Blue theme */
body[data-theme="dark-blue"] {
    background-color: #0d1b2a;
    color: #d9e4f0;
}

body[data-theme="dark-blue"] #content {
    background-color: #0d1b2a;
}

body[data-theme="dark-blue"] .scripture {
    color: #d9e4f0;
}

body[data-theme="dark-blue"] .favorite-prayer-card,
body[data-theme="dark-blue"] .prayer-list-item,
body[data-theme="dark-blue"] .simple-language-button {
    background-color: #1b263b;
    border-color: #415a77;
    color: #d9e4f0;
}

body[data-theme="dark-blue"] .filter-switch-container,
body[data-theme="dark-blue"] .translations-switcher {
    background-color: #1b263b;
}

body[data-theme="dark-blue"] .bahai-star {
    color: #4a9eff;
}

body[data-theme="dark-blue"] .mdl-layout__header {
    background-color: #0a1128 !important;
}

body[data-theme="dark-blue"] h2,
body[data-theme="dark-blue"] h3,
body[data-theme="dark-blue"] #prayer-main-title {
    color: #d9e4f0;
}

body[data-theme="dark-blue"] a {
    color: #4a9eff;
}

body[data-theme="dark-blue"] .simple-language-button .language-name {
    color: #d9e4f0;
}

body[data-theme="dark-blue"] .simple-language-button .language-code {
    color: #4a9eff;
}

body[data-theme="dark-blue"] .simple-language-button .language-count {
    color: #778da9;
}

body[data-theme="dark-blue"] #translations-menu-btn {
    color: #4a9eff !important;
}

/* Dark-blue theme language links */
body[data-theme="dark-blue"] .translation-link {
    background-color: #1b263b;
    color: #b8c9e0;
    border-color: #415a77;
}

body[data-theme="dark-blue"] .translation-link:hover {
    background-color: #2a3a52;
    border-color: #4a6380;
}

body[data-theme="dark-blue"] .translation-link.active {
    background-color: #4a9eff;
    color: white;
    border-color: #4a9eff;
}

body[data-theme="dark-blue"] .random-prayer-card {
    background-color: #1b263b;
    border: 1px solid #415a77;
}

body[data-theme="dark-blue"] .random-prayer-card h4 {
    color: #4a9eff;
}

body[data-theme="dark-blue"] .language-picker-tabs {
    border-top-color: #415a77;
}

body[data-theme="dark-blue"] .language-picker-tabs::before {
    color: #4a9eff;
}

body[data-theme="dark-blue"]
    .language-picker-tabs
    .mdl-tabs__tab-bar
    .mdl-tabs__tab {
    background-color: transparent;
    border-color: #415a77;
    color: #b8c9e0;
}

body[data-theme="dark-blue"]
    .language-picker-tabs
    .mdl-tabs__tab-bar
    .mdl-tabs__tab:hover {
    background-color: #2a3a52;
    border-color: #4a9eff;
}

body[data-theme="dark-blue"]
    .language-picker-tabs
    .mdl-tabs__tab-bar
    .mdl-tabs__tab.is-active {
    background-color: #3f51b5;
    color: #ffffff;
    border-color: #3f51b5;
}

body[data-theme="dark-blue"] .language-picker-tabs #all-languages-menu-btn {
    background-color: transparent;
    border-color: #415a77;
    color: #b8c9e0;
}

body[data-theme="dark-blue"]
    .language-picker-tabs
    #all-languages-menu-btn:hover {
    background-color: #2a3a52;
    border-color: #4a9eff;
}

body[data-theme="dark-blue"] .language-picker-tabs #refresh-language-cache-btn {
    background-color: transparent;
    border-color: #415a77;
    color: #b8c9e0;
}

body[data-theme="dark-blue"]
    .language-picker-tabs
    #refresh-language-cache-btn:hover {
    background-color: #2a3a52;
    border-color: #4a9eff;
}

body[data-theme="dark-blue"] .language-picker-tabs .mdl-menu {
    background-color: #1b263b !important;
    border-color: #415a77;
}

body[data-theme="dark-blue"] .language-picker-tabs .mdl-menu__item {
    background-color: transparent !important;
    color: #b8c9e0 !important;
}

body[data-theme="dark-blue"] .language-picker-tabs .mdl-menu__item:hover {
    background-color: #2a3a52 !important;
}

body[data-theme="dark-blue"]
    .language-picker-tabs
    #language-search-li
    .mdl-textfield__input {
    color: #b8c9e0;
}

body[data-theme="dark-blue"]
    .language-picker-tabs
    #language-search-li
    .mdl-textfield__label {
    color: #778da9;
}

/* Forest Night theme */
body[data-theme="dark-green"] {
    background-color: #0f1e13;
    color: #d8e8dc;
}

body[data-theme="dark-green"] #content {
    background-color: #0f1e13;
}

body[data-theme="dark-green"] .scripture {
    color: #d8e8dc;
}

body[data-theme="dark-green"] .favorite-prayer-card,
body[data-theme="dark-green"] .prayer-list-item,
body[data-theme="dark-green"] .simple-language-button {
    background-color: #1a2f1e;
    border-color: #2d5038;
    color: #d8e8dc;
}

body[data-theme="dark-green"] .filter-switch-container,
body[data-theme="dark-green"] .translations-switcher {
    background-color: #1a2f1e;
}

body[data-theme="dark-green"] .bahai-star {
    color: #66bb6a;
}

body[data-theme="dark-green"] .mdl-layout__header {
    background-color: #0a1510 !important;
}

body[data-theme="dark-green"] h2,
body[data-theme="dark-green"] h3,
body[data-theme="dark-green"] #prayer-main-title {
    color: #d8e8dc;
}

body[data-theme="dark-green"] a {
    color: #66bb6a;
}

body[data-theme="dark-green"] .simple-language-button .language-name {
    color: #d8e8dc;
}

body[data-theme="dark-green"] .simple-language-button .language-code {
    color: #66bb6a;
}

body[data-theme="dark-green"] .simple-language-button .language-count {
    color: #5a7a5e;
}

body[data-theme="dark-green"] #translations-menu-btn {
    color: #66bb6a !important;
}

/* Dark-green theme language links */
body[data-theme="dark-green"] .translation-link {
    background-color: #1b2e1b;
    color: #b8d4b8;
    border-color: #2e5c2e;
}

body[data-theme="dark-green"] .translation-link:hover {
    background-color: #2a3f2a;
    border-color: #3a6b3a;
}

body[data-theme="dark-green"] .translation-link.active {
    background-color: #4caf50;
    color: white;
    border-color: #4caf50;
}

body[data-theme="dark-green"] .random-prayer-card {
    background-color: #1a2f1e;
    border: 1px solid #2d5038;
}

body[data-theme="dark-green"] .random-prayer-card h4 {
    color: #66bb6a;
}

body[data-theme="dark-green"] .language-picker-tabs {
    border-top-color: #2d5038;
}

body[data-theme="dark-green"] .language-picker-tabs::before {
    color: #66bb6a;
}

body[data-theme="dark-green"]
    .language-picker-tabs
    .mdl-tabs__tab-bar
    .mdl-tabs__tab {
    background-color: transparent;
    border-color: #2d5038;
    color: #b8d4bc;
}

body[data-theme="dark-green"]
    .language-picker-tabs
    .mdl-tabs__tab-bar
    .mdl-tabs__tab:hover {
    background-color: #253830;
    border-color: #66bb6a;
}

body[data-theme="dark-green"]
    .language-picker-tabs
    .mdl-tabs__tab-bar
    .mdl-tabs__tab.is-active {
    background-color: #4caf50;
    color: #ffffff;
    border-color: #4caf50;
}

body[data-theme="dark-green"] .language-picker-tabs #all-languages-menu-btn {
    background-color: transparent;
    border-color: #2d5038;
    color: #b8d4bc;
}

body[data-theme="dark-green"]
    .language-picker-tabs
    #all-languages-menu-btn:hover {
    background-color: #253830;
    border-color: #66bb6a;
}

body[data-theme="dark-green"]
    .language-picker-tabs
    #refresh-language-cache-btn {
    background-color: transparent;
    border-color: #2d5038;
    color: #b8d4bc;
}

body[data-theme="dark-green"]
    .language-picker-tabs
    #refresh-language-cache-btn:hover {
    background-color: #253830;
    border-color: #66bb6a;
}

body[data-theme="dark-green"] .language-picker-tabs .mdl-menu {
    background-color: #1a2f1e !important;
    border-color: #2d5038;
}

body[data-theme="dark-green"] .language-picker-tabs .mdl-menu__item {
    background-color: transparent !important;
    color: #b8d4bc !important;
}

body[data-theme="dark-green"] .language-picker-tabs .mdl-menu__item:hover {
    background-color: #253830 !important;
}

body[data-theme="dark-green"]
    .language-picker-tabs
    #language-search-li
    .mdl-textfield__input {
    color: #b8d4bc;
}

body[data-theme="dark-green"]
    .language-picker-tabs
    #language-search-li
    .mdl-textfield__label {
    color: #5a7a5e;
}

/* Sepia theme */
body[data-theme="sepia"] {
    background-color: #f4ecd8;
    color: #3d2817;
}

body[data-theme="sepia"] #content {
    background-color: #f4ecd8;
}

body[data-theme="sepia"] .scripture {
    color: #3d2817;
}

body[data-theme="sepia"] .favorite-prayer-card,
body[data-theme="sepia"] .prayer-list-item,
body[data-theme="sepia"] .simple-language-button {
    background-color: #e8dcc4;
    border-color: #c9b892;
}

body[data-theme="sepia"] .filter-switch-container,
body[data-theme="sepia"] .translations-switcher {
    background-color: #e8dcc4;
}

body[data-theme="sepia"] .bahai-star {
    color: #8b6914;
}

body[data-theme="sepia"] .mdl-layout__header {
    background-color: #8b6914 !important;
}

body[data-theme="sepia"] a {
    color: #8b4513;
}

body[data-theme="sepia"] .simple-language-button .language-name {
    color: #4a3728;
}

body[data-theme="sepia"] .simple-language-button .language-code {
    color: #8b4513;
}

body[data-theme="sepia"] #translations-menu-btn {
    color: #8b4513 !important;
}

/* Sepia theme language links */
body[data-theme="sepia"] .translation-link {
    background-color: #f4f1e8;
    color: #5d4e37;
    border-color: #d4c4a8;
}

body[data-theme="sepia"] .translation-link:hover {
    background-color: #e8e0d0;
    border-color: #c4b498;
}

body[data-theme="sepia"] .translation-link.active {
    background-color: #8b4513;
    color: white;
    border-color: #8b4513;
}

body[data-theme="sepia"] .random-prayer-card {
    background-color: #3e3529;
    border: 1px solid #5a4a3a;
}

body[data-theme="sepia"] .random-prayer-card h4 {
    color: #d4a574;
}

body[data-theme="sepia"] .random-prayer-card {
    color: #c9bfb5;
}

body[data-theme="sepia"] .random-prayer-card .scripture {
    color: #c9bfb5;
}

body[data-theme="sepia"] .language-picker-tabs {
    border-top-color: #5a4a3a;
}

body[data-theme="sepia"] .language-picker-tabs::before {
    color: #d4a574;
}

body[data-theme="sepia"]
    .language-picker-tabs
    .mdl-tabs__tab-bar
    .mdl-tabs__tab {
    background-color: transparent;
    border-color: #5a4a3a;
    color: #c9bfb5;
}

body[data-theme="sepia"]
    .language-picker-tabs
    .mdl-tabs__tab-bar
    .mdl-tabs__tab:hover {
    background-color: #4a3f38;
    border-color: #d4a574;
}

body[data-theme="sepia"]
    .language-picker-tabs
    .mdl-tabs__tab-bar
    .mdl-tabs__tab.is-active {
    background-color: #8b4513;
    color: #ffffff;
    border-color: #8b4513;
}

body[data-theme="sepia"] .language-picker-tabs #all-languages-menu-btn {
    background-color: transparent;
    border-color: #5a4a3a;
    color: #c9bfb5;
}

body[data-theme="sepia"] .language-picker-tabs #all-languages-menu-btn:hover {
    background-color: #4a3f38;
    border-color: #d4a574;
}

body[data-theme="sepia"] .language-picker-tabs #refresh-language-cache-btn {
    background-color: transparent;
    border-color: #5a4a3a;
    color: #c9bfb5;
}

body[data-theme="sepia"]
    .language-picker-tabs
    #refresh-language-cache-btn:hover {
    background-color: #4a3f38;
    border-color: #d4a574;
}

body[data-theme="sepia"] .language-picker-tabs .mdl-menu {
    background-color: #3e3529 !important;
    border-color: #5a4a3a;
}

body[data-theme="sepia"] .language-picker-tabs .mdl-menu__item {
    background-color: transparent !important;
    color: #c9bfb5 !important;
}

body[data-theme="sepia"] .language-picker-tabs .mdl-menu__item:hover {
    background-color: #4a3f38 !important;
}

body[data-theme="sepia"]
    .language-picker-tabs
    #language-search-li
    .mdl-textfield__input {
    color: #c9bfb5;
}

body[data-theme="sepia"]
    .language-picker-tabs
    #language-search-li
    .mdl-textfield__label {
    color: #9d8b7d;
}

.mdl-layout {
    min-height: 100vh;
    background-color: transparent;
}

/* Header Adjustments - keep it minimal */
.mdl-layout__header-row .mdl-layout-title {
    padding-left: 16px;
    margin-left: 0;
    flex-grow: 0;
}

.mdl-layout__header-row .mdl-layout-title .bahai-star {
    font-size: 1.3em;
    vertical-align: middle;
    margin-right: 4px;
}

.mdl-layout__header-row .mdl-layout-spacer {
    flex-grow: 1;
}

/* Main Content Layout - centered and clean */
#main-view-container {
    display: flex;
    justify-content: center;
    padding: 20px;
    max-width: 900px;
    margin: 0 auto;
}

#content-column {
    flex: 1;
    width: 100%;
}

#content {
    background-color: #ffffff;
    padding: 40px;
    border-radius: 2px;
    transition: background-color 0.3s ease;
}

/* Responsive Layout Adjustments */
@media screen and (max-width: 767px) {
    .mdl-layout__header-row {
        padding-left: 0;
        padding-right: 8px;
    }
    .mdl-layout__header-row .mdl-layout-title {
        font-size: 1rem;
        flex: 0 1 auto;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        margin-right: 8px;
        padding-left: 16px;
    }
    .mdl-layout__header-row .mdl-textfield--expandable {
        flex-shrink: 0;
    }
    #content {
        padding: 20px;
    }
}

@media screen and (max-width: 480px) {
    #main-view-container {
        padding: 10px;
    }
    #content {
        padding: 15px;
    }
}

/* Prayer Content Styling - focus on readability */
#content a {
    color: #3f51b5;
    text-decoration: none;
    font-weight: normal;
}

#content a:hover {
    text-decoration: underline;
}

.scripture {
    font-family: "Gentium", "Times New Roman", serif;
    max-width: 700px;
    margin: 30px auto;
    line-height: 1.8;
    font-size: 1.5em;
    text-align: justify;
}

/* Add decorative star before prayers */
.scripture::before {
    content: "✦";
    display: block;
    text-align: center;
    font-size: 1.5em;
    color: #3f51b5;
    margin-bottom: 20px;
    font-family: "Noto Sans Symbols 2", sans-serif;
}

.author {
    margin-top: 2em;
    text-align: right;
    font-weight: normal;
    font-style: italic;
    color: #666;
}

.author::before {
    content: "— ";
}

h2 {
    font-size: 1.4em;
    color: #333;
    font-weight: normal;
    text-align: center;
    margin-bottom: 20px;
}

#prayer-main-title {
    font-size: 1.6em;
    font-weight: normal;
    margin: 0 0 20px 0;
    display: block;
    text-align: center;
    color: #333;
}

/* Add star to section headings */
#prayer-main-title::before {
    content: "✦ ";
    color: #3f51b5;
    font-family: "Noto Sans Symbols 2", sans-serif;
}

small {
    font-family: "Gentium", "Times New Roman", serif;
    font-size: 0.85em;
    display: block;
    margin: 5px auto;
    margin-top: 20px;
    text-align: center;
    color: #666;
}

.prayer-list-item {
    margin-bottom: 1em;
    padding: 15px;
    background-color: #fafafa;
    border-radius: 2px;
    border-left: 3px solid #3f51b5;
    transition:
        background-color 0.3s ease,
        transform 0.2s ease;
}

.prayer-list-item:hover {
    transform: translateX(3px);
}

.pagination {
    margin-top: 30px;
    text-align: center;
}

.pagination button {
    margin: 0 5px;
}

/* MDL Overrides */
.mdl-layout__header-row .mdl-textfield__input {
    color: white;
}

.mdl-layout__header-row .mdl-textfield__label:after {
    background-color: white;
}

/* Prayer Actions */
.prayer-actions {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    text-align: center;
}

.prayer-actions .mdl-button .material-icons {
    margin-right: 8px;
    vertical-align: middle;
}

#inform-mistake-button {
    background-color: #f5f5f5;
    color: #666;
}

#inform-mistake-button:hover {
    background-color: #e0e0e0;
}

/* Favorite Prayer Button */
.favorite-toggle-button {
    color: #bdbdbd;
    margin: 0 10px 0 0;
    display: inline-flex;
    align-items: center;
    vertical-align: middle;
    background-color: #ffffff;
    box-shadow: none;
}

.favorite-toggle-button:hover {
    background-color: #f5f5f5;
}

.favorite-toggle-button.is-favorite {
    color: #ffc107;
}

.favorite-toggle-button .material-icons {
    font-size: 24px;
    margin-right: 4px;
}

/* Markdown Content Styling */
.markdown-content {
    white-space: normal;
    line-height: 1.8;
}

.markdown-content h1,
.markdown-content h2,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6 {
    color: #333;
    margin-top: 1.5em;
    margin-bottom: 0.5em;
    font-weight: normal;
    text-align: center;
}

.markdown-content h1 {
    font-size: 1.4em;
    border-bottom: none;
}

.markdown-content h2 {
    font-size: 1.3em;
    border-bottom: none;
}

.markdown-content h3 {
    font-size: 1.2em;
}

.markdown-content p {
    margin-bottom: 1em;
    line-height: 1.8;
}

.markdown-content em {
    font-style: italic;
    color: #555;
}

.markdown-content strong {
    font-weight: bold;
}

.markdown-content blockquote {
    border-left: 3px solid #3f51b5;
    margin-left: 0;
    padding-left: 1.5em;
    font-style: italic;
    color: #555;
}

.markdown-content ul,
.markdown-content ol {
    margin-bottom: 1em;
    padding-left: 2em;
}

.markdown-content li {
    margin-bottom: 0.5em;
}

/* Favorite prayers section */
#favorite-prayers-section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #eee;
}

#favorite-prayers-section h3 {
    font-size: 1.2em;
    color: #333;
    margin-top: 0;
    margin-bottom: 15px;
    text-align: center;
    font-weight: normal;
}

#favorite-prayers-section h3::before {
    content: "✦ ";
    color: #3f51b5;
    font-family: "Noto Sans Symbols 2", sans-serif;
}

.favorite-prayer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.random-prayer-card {
    background-color: #fafafa;
    border: 1px solid #eee;
    border-radius: 4px;
    box-shadow:
        0 1px 3px rgba(0, 0, 0, 0.12),
        0 1px 2px rgba(0, 0, 0, 0.24);
    transition:
        box-shadow 0.2s,
        background-color 0.3s ease;
}

.random-prayer-card h4 {
    color: #3f51b5;
}

.favorite-prayer-card .random-prayer-card {
    background-color: #fafafa;
    border: 1px solid #eee;
    border-radius: 2px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 150px;
    transition:
        box-shadow 0.2s,
        background-color 0.3s ease;
}

.favorite-prayer-card:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.favorite-prayer-card-header {
    font-size: 1.1em;
    margin-bottom: 10px;
    color: #3f51b5;
}

.favorite-prayer-card-header a {
    text-decoration: none;
    color: inherit;
}

.favorite-prayer-card-preview {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
    line-height: 1.6;
}

.favorite-prayer-card-meta {
    font-size: 0.85em;
    color: #999;
    margin-bottom: 10px;
}

.favorite-prayer-card-meta span {
    margin-right: 10px;
    display: inline-block;
}

.favorite-prayer-card-meta .phelps-code a {
    color: #3f51b5;
    text-decoration: none;
}

.favorite-prayer-card-meta .phelps-code a:hover {
    text-decoration: underline;
}

.favorite-prayer-card-translations {
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid #eee;
}

.favorite-prayer-card-translations h5 {
    font-size: 0.85em;
    color: #666;
    margin-top: 0;
    margin-bottom: 5px;
    font-weight: normal;
}

.favorite-prayer-card-translations-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
}

.favorite-prayer-card-translations-item a {
    font-size: 0.8em;
    text-decoration: none;
    color: #3f51b5;
    background-color: #f5f5f5;
    padding: 3px 8px;
    border-radius: 2px;
    transition: background-color 0.2s;
}

.favorite-prayer-card-translations-item a:hover {
    background-color: #e0e0e0;
}

/* Other versions list */
.other-versions-in-lang-list {
    list-style: none;
    padding-left: 0;
    font-size: 0.9em;
    margin: 15px 0;
    color: #666;
}

.other-versions-in-lang-list li {
    margin-bottom: 5px;
    padding-left: 20px;
    position: relative;
}

.other-versions-in-lang-list li::before {
    content: "✦";
    position: absolute;
    left: 0;
    color: #3f51b5;
    font-family: "Noto Sans Symbols 2", sans-serif;
    font-size: 0.8em;
}

.other-versions-in-lang-list a {
    text-decoration: none;
    color: #3f51b5;
}

.other-versions-in-lang-list a:hover {
    text-decoration: underline;
}

/* Filter Switch */
.filter-switch-container {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f9f9f9;
    border-radius: 2px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.3s ease;
}

/* Language Picker - redesigned for bottom placement */
.language-picker-tabs {
    display: block;
    width: 100%;
    margin-top: 50px;
    margin-bottom: 0;
    padding: 25px 0 20px 0;
    border-top: 2px solid #eee;
    background-color: transparent;
}

.language-picker-tabs::before {
    content: "✦";
    display: block;
    text-align: center;
    font-size: 1.2em;
    color: #3f51b5;
    margin-bottom: 15px;
    font-family: "Noto Sans Symbols 2", sans-serif;
}

.language-picker-tabs .mdl-tabs__tab-bar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    border-bottom: none !important;
    align-items: center;
    height: auto !important;
    gap: 10px;
}

.language-picker-tabs .mdl-tabs__tab-bar .mdl-tabs__tab {
    white-space: normal;
    height: auto;
    line-height: 1.3;
    padding: 10px 18px;
    text-align: center;
    flex-grow: 0;
    min-width: 85px;
    margin: 0;
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 25px;
    color: #666;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.language-picker-tabs .mdl-tabs__tab-bar .mdl-tabs__tab:hover {
    background-color: #f5f5f5;
    border-color: #3f51b5;
    transform: translateY(-2px);
}

.language-picker-tabs .mdl-tabs__tab-bar .mdl-tabs__tab.is-active {
    background-color: #3f51b5;
    color: white;
    border-color: #3f51b5;
}

.language-picker-tabs
    .mdl-tabs__tab-bar
    .mdl-tabs__tab
    span[style*="font-size"] {
    display: inline;
    margin-left: 4px;
    font-size: 0.8em !important;
    opacity: 0.85 !important;
}

.language-picker-tabs .more-languages-section-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 15px;
    gap: 10px;
}

.language-picker-tabs #all-languages-menu-btn {
    text-transform: none;
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 25px;
    padding: 10px 18px;
    color: #666;
    font-size: 0.9em;
    transition: all 0.2s ease;
}

.language-picker-tabs #all-languages-menu-btn:hover {
    background-color: #f5f5f5;
    border-color: #3f51b5;
    transform: translateY(-2px);
}

.language-picker-tabs #refresh-language-cache-btn {
    background-color: transparent;
    border: 1px solid #ddd;
    border-radius: 50%;
    transition: all 0.2s ease;
}

.language-picker-tabs #refresh-language-cache-btn:hover {
    background-color: #f5f5f5;
    border-color: #3f51b5;
    transform: translateY(-2px);
}

.language-picker-tabs #language-search-li {
    padding: 0 8px;
}

.language-picker-tabs #language-search-li .mdl-textfield {
    width: calc(100% - 16px);
    padding: 0;
}

.language-picker-tabs #all-languages-menu-ul {
    max-height: 65vh;
    overflow-y: auto;
}

.language-picker-tabs .mdl-menu__container {
    z-index: 10005 !important;
}

/* Safari menu fixes */
.language-picker-tabs .mdl-menu {
    background-color: #fff !important;
    border: 1px solid #eee;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.language-picker-tabs .mdl-menu__item {
    background-color: transparent !important;
    color: #333 !important;
}

/* Theme menu styling */
.mdl-menu .bahai-star {
    margin-right: 8px;
    color: #3f51b5;
}

/* Translations Switcher */
.translations-switcher {
    padding: 10px 20px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: wrap;
    background-color: transparent;
    border-bottom: none;
    transition: background-color 0.3s ease;
}

.translations-switcher-label {
    display: none;
}

#translations-menu-btn {
    color: #3f51b5 !important;
}

#translations-menu {
    background-color: #fff !important;
    border: 1px solid #eee !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    max-height: 400px !important;
    overflow-y: auto !important;
    z-index: 10000 !important;
    position: absolute !important;
    display: block !important;
    visibility: visible !important;
    pointer-events: auto !important;
    opacity: 1 !important;
    min-width: 250px !important;
    padding: 8px 0 !important;
    margin: 0 !important;
}

#translations-menu.mdl-menu--open {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

#translations-menu .mdl-menu__item {
    color: #333 !important;
    padding: 12px 16px !important;
    font-size: 0.9em !important;
    display: block !important;
    width: 100% !important;
    text-align: left !important;
    border: none !important;
    background: none !important;
    cursor: pointer !important;
    box-sizing: border-box !important;
    line-height: 1.5 !important;
    pointer-events: auto !important;
}

#translations-menu .mdl-menu__item:active,
#translations-menu .mdl-menu__item:focus {
    background-color: #f5f5f5 !important;
    outline: none !important;
}

#translations-menu .mdl-menu__item:hover {
    background-color: #ececec !important;
}

#translations-menu .mdl-menu__item.is-active {
    background-color: #e3f2fd !important;
    color: #3f51b5 !important;
    font-weight: 600 !important;
}

/* Content positioning */
main.mdl-layout__content {
    padding-top: 20px;
    box-sizing: border-box;
}

@media screen and (min-width: 1025px) {
    main.mdl-layout__content {
        padding-top: 20px;
    }
}

/* Language buttons */
.language-buttons-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    padding: 10px 0;
}

.language-buttons-container .mdl-button {
    margin: 5px;
    background-color: #f5f5f5;
}

.language-buttons-container .mdl-button.lang-button-green {
    background-color: #e8f5e9;
    color: #2e7d32;
}

.language-buttons-container .mdl-button.lang-button-yellow {
    background-color: #fff9c4;
    color: #f57f17;
}

/* Refresh button */
#refresh-language-cache-btn {
    min-width: 32px !important;
    width: 32px !important;
    height: 32px !important;
    padding: 4px !important;
}

#refresh-language-cache-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

#refresh-language-cache-btn .material-icons {
    font-size: 18px;
}

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

/* Bahá'í star loading spinner */
.bahai-loading-spinner {
    display: inline-block;
    text-align: center;
    font-size: 3em;
    color: #3f51b5;
    animation: spin 2s linear infinite;
    font-family: "Noto Sans Symbols 2", sans-serif;
    margin: 40px auto;
    transform-origin: center;
}

/* Simple Language Selector */
.simple-language-selector {
    margin-top: 50px;
    padding-top: 30px;
    border-top: 2px solid #eee;
}

.simple-language-selector-header {
    text-align: center;
    margin-bottom: 30px;
}

.simple-language-selector-header .bahai-star {
    font-size: 1.5em;
    color: #3f51b5;
    display: block;
    margin-bottom: 10px;
}

.simple-language-selector-header h3 {
    margin: 0;
    font-size: 1.3em;
    font-weight: normal;
    color: #333;
}

.simple-language-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.simple-language-button {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    background-color: #fafafa;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    text-decoration: none;
    color: #333;
    transition: all 0.2s ease;
    position: relative;
}

.simple-language-button:hover {
    background-color: #f0f0f0;
    border-color: #3f51b5;
    transform: translateY(-2px);
    box-shadow: 0 2px 8px rgba(63, 81, 181, 0.2);
}

.simple-language-button.suggested {
    border-color: #3f51b5;
    background-color: #f5f7ff;
}

.simple-language-button .language-name {
    font-size: 1.2em;
    font-weight: bold;
    color: #333;
    margin-bottom: 5px;
}

.simple-language-button .language-code {
    font-size: 0.85em;
    color: #3f51b5;
    font-family: monospace;
    margin-bottom: 8px;
}

.simple-language-button .language-count {
    font-size: 0.85em;
    color: #999;
}

.simple-language-button .lang-suggestion-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: #3f51b5;
    color: white;
    font-size: 0.7em;
    padding: 3px 8px;
    border-radius: 10px;
    font-weight: 500;
}

@media screen and (max-width: 767px) {
    .simple-language-buttons {
        grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
        gap: 12px;
    }

    .simple-language-button {
        padding: 15px;
    }

    .simple-language-button .language-name {
        font-size: 1.1em;
    }

    .simple-language-button .language-code {
        font-size: 0.8em;
    }
}

.text-center {
    text-align: center;
}

.main-content-spinner {
    text-align: center;
    padding: 20px;
}
