/* Light Theme (default) */
:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f5f5;
    --bg-tertiary: #e8e8e8;
    --text-primary: #333333;
    --text-secondary: #666666;
    --border-color: #ddd;
    --accent-color: #4a90d9;
    --accent-hover: #357abd;
    --shadow: 0 2px 4px rgba(0,0,0,0.1);
    --sidebar-width: 300px;
    --sidebar-collapsed-width: 60px;
    --header-height: 60px;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
}

/* Dark Theme */
[data-theme="dark"] {
    --bg-primary: #1a1a2e;
    --bg-secondary: #16213e;
    --bg-tertiary: #0f3460;
    --text-primary: #e8e8e8;
    --text-secondary: #b8b8b8;
    --border-color: #4a4a6a;
    --accent-color: #5dade2;
    --accent-hover: #3498db;
    --shadow: 0 2px 4px rgba(0,0,0,0.3);
    --success-color: #1e7e34;
    --danger-color: #e74c3c;
    --warning-color: #d39e00;
}

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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: background-color 0.3s, color 0.3s;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

/* Top Bar */
.top-bar {
    height: var(--header-height);
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    box-shadow: var(--shadow);
    transition: background-color 0.3s, border-color 0.3s;
    position: relative;
    z-index: 1001;
}

.top-bar h1 {
    font-size: 1.5rem;
    color: var(--text-primary);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex-shrink: 1;
    min-width: 0;
}

.top-controls {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Notification Bell */
.notification-bell {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: background-color 0.3s;
}

.notification-bell:hover {
    background-color: var(--bg-tertiary);
}

.bell-icon {
    font-size: 1.3rem;
}

.notification-count {
    position: absolute;
    top: 0;
    right: 0;
    background-color: #e74c3c;
    color: white;
    font-size: 0.7rem;
    font-weight: bold;
    min-width: 18px;
    height: 18px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    animation: pulse-notification 2s infinite;
}

@keyframes pulse-notification {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

/* Notification Dropdown */
.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 2000;
    display: none;
}

.notification-dropdown.show {
    display: block;
}

.notification-dropdown-header {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    font-weight: bold;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.notification-dropdown-header > div {
    display: flex;
    gap: 5px;
}

.notification-dropdown-header button {
    font-size: 0.75rem;
    padding: 4px 8px;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    transition: background-color 0.2s;
}

.notification-item:hover {
    background-color: var(--bg-secondary);
}

.notification-item:last-child {
    border-bottom: none;
}

.notification-item.invite {
    border-left: 3px solid #f39c12;
}

.notification-item.vote {
    border-left: 3px solid #9b59b6;
}

.notification-item.left {
    border-left: 3px solid #95a5a6;
}

.notification-item.session {
    border-left: 3px solid #dc3545;
    background-color: rgba(220, 53, 69, 0.05);
}

.notification-item.confirmed {
    border-left: 3px solid #27ae60;
    background-color: rgba(39, 174, 96, 0.05);
}

.notification-item.accepted {
    border-left: 3px solid #27ae60;
}

.notification-item.rejoined {
    border-left: 3px solid #3498db;
}

.notification-item.realtime {
    border-left: 3px solid var(--accent-color);
}

.notification-item {
    position: relative;
}

.notification-dismiss {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 20px;
    height: 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    opacity: 0;
    transition: opacity 0.2s;
}

.notification-item:hover .notification-dismiss {
    opacity: 1;
}

.notification-dismiss:hover {
    color: #dc3545;
}

.notification-item-title {
    font-weight: 600;
    margin-bottom: 4px;
}

.notification-item-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.notification-item-time {
    font-size: 0.75rem;
    color: var(--text-tertiary);
    margin-top: 4px;
}

.notification-empty {
    padding: 20px;
    text-align: center;
    color: var(--text-secondary);
}

.version-dropdown {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.3s;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.version-dropdown:hover {
    border-color: var(--accent-color);
}

.tab-btn {
    padding: 8px 16px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text-primary);
}

.tab-btn:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-color);
}

.tab-btn.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.tab-icon {
    font-size: 1.2rem;
}

.tab-label {
    font-weight: 500;
}

.theme-toggle {
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    cursor: pointer;
    transition: all 0.3s;
    font-size: 1.2rem;
}

.theme-toggle:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-color);
}

/* Content Wrapper */
.content-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background-color: var(--bg-primary);
    border-right: 1px solid var(--border-color);
    overflow-y: auto;
    transition: background-color 0.3s, border-color 0.3s;
    display: flex;
    flex-direction: column;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 10px;
    gap: 5px;
    border-bottom: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.side-nav-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 15px;
    border: none;
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
    text-align: left;
    font-size: 0.95rem;
    font-weight: 500;
}

.side-nav-btn:hover {
    background-color: var(--bg-tertiary);
}

.side-nav-btn.active {
    background-color: var(--accent-color);
    color: white;
}

.side-nav-btn .nav-icon {
    font-size: 1.2rem;
}

.nav-separator {
    height: 1px;
    background-color: var(--border-color);
    margin: 8px 10px;
}

.nav-heading {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 12px 15px 8px;
    margin-top: 5px;
    background-color: var(--bg-tertiary);
    border-radius: 6px;
    margin-left: 5px;
    margin-right: 5px;
}

.sidebar-header {
    padding: 15px 20px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 10;
}

.sidebar h2 {
    font-size: 1.2rem;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
}

.sidebar-header-controls {
    display: flex;
    gap: 8px;
}

.collapse-sidebar-btn {
    padding: 6px 10px;
    border-radius: 4px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: var(--text-primary);
}

.collapse-sidebar-btn:hover {
    background-color: var(--bg-tertiary);
    border-color: var(--accent-color);
}

.collapse-sidebar-btn .btn-icon {
    font-size: 1.2rem;
    line-height: 1;
}

/* Collapsed Sidebar State */
.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar.collapsed .sidebar-header h2 {
    opacity: 0;
    width: 0;
}

.sidebar.collapsed .sidebar-header-controls {
    width: 100%;
    justify-content: center;
}

.sidebar.collapsed .collapse-sidebar-btn {
    padding: 8px;
}

.sidebar.collapsed .sidebar-nav {
    padding: 10px 5px;
}

.sidebar.collapsed .side-nav-btn {
    justify-content: center;
    padding: 12px 0;
}

.sidebar.collapsed .side-nav-btn .nav-icon {
    margin: 0;
}

.sidebar.collapsed .nav-label {
    display: none;
}

.sidebar.collapsed .nav-separator {
    margin: 8px 5px;
}

.sidebar.collapsed .nav-heading {
    display: none;
}

.sidebar.collapsed .psalms-nav {
    display: none;
}

.sidebar.collapsed .psalms-nav .category-header .category-title,
.sidebar.collapsed .psalms-nav .category-header .category-toggle,
.sidebar.collapsed .psalms-nav .category-header .sidebar-unfavorite-btn,
.sidebar.collapsed .psalms-nav .category-header .template-psalm-count {
    display: none;
}

.sidebar.collapsed .psalms-nav .category-emoji {
    font-size: 1.2rem;
    margin: 0;
}

.sidebar.collapsed .psalms-nav .category-header {
    justify-content: center;
    padding: 12px 0;
    gap: 0;
}

.sidebar.collapsed .psalms-nav .category-toggle {
    margin: 0;
}

.sidebar.collapsed .psalms-nav .category-subsections {
    display: none;
}

.sidebar.collapsed .collapse-sidebar-btn .btn-icon {
    transform: rotate(180deg);
}

.psalms-nav {
    list-style: none;
}

/* Category Section */
.category-section {
    margin-bottom: 8px;
}

.category-header {
    padding: 12px 16px;
    background-color: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.category-header:hover {
    background-color: var(--bg-tertiary);
}

.category-toggle {
    font-size: 0.8rem;
    transition: transform 0.2s;
}

.category-title {
    font-size: 1rem;
}

.category-subsections {
    background-color: var(--bg-primary);
}

/* Subsection Section */
.subsection-section {
    margin-bottom: 4px;
}

.subsection-header {
    padding: 10px 16px 10px 32px;
    background-color: var(--bg-primary);
    border-bottom: 1px solid var(--border-color);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    color: var(--text-primary);
    transition: background-color 0.2s;
}

.subsection-header:hover {
    background-color: var(--bg-secondary);
}

.subsection-toggle {
    font-size: 0.7rem;
    transition: transform 0.2s;
}

.subsection-title {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.subsection-description {
    padding: 8px 16px 8px 48px;
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-style: italic;
    border-bottom: 1px solid var(--border-color);
}

.subsection-psalms {
    background-color: var(--bg-primary);
}

/* Psalm Item */
.psalm-item {
    cursor: pointer;
    transition: all 0.2s;
}

.psalm-item-content {
    padding: 10px 20px 10px 48px;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
}

.psalm-item-number {
    font-weight: bold;
    color: var(--accent-color);
    margin-right: 8px;
    font-size: 0.95rem;
}

.psalm-item-topic {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 2px;
}

.psalm-item:hover .psalm-item-content {
    background-color: var(--bg-secondary);
}

.psalm-item.active .psalm-item-content {
    background-color: var(--accent-color);
    color: white;
}

.psalm-item.active .psalm-item-number,
.psalm-item.active .psalm-item-topic {
    color: white;
}

/* Collapsed sidebar psalm items */
.sidebar.collapsed .psalm-item-content {
    padding: 10px 0;
    text-align: center;
}

.sidebar.collapsed .psalm-item-topic {
    display: none;
}

.sidebar.collapsed .psalm-item-number {
    margin: 0;
}

/* Collapsed states */
.category-section.collapsed .category-subsections,
.subsection-section.collapsed .subsection-description,
.subsection-section.collapsed .subsection-psalms {
    display: none;
}

/* Main Content */
.main-content {
    flex: 1;
    overflow-y: auto;
    background-color: var(--bg-secondary);
    padding: 30px 50px;
}

/* Views */
.view {
    display: none;
    max-width: 1000px;
    margin: 0 auto;
}

.view.active {
    display: block;
}

/* Psalm Display */
.template-nav {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background-color: var(--bg-primary);
    padding: 8px 15px;
    border-radius: 8px 8px 0 0;
    box-shadow: 0 -2px 10px rgba(0,0,0,0.1);
    gap: 10px;
    position: sticky;
    bottom: 0;
    z-index: 100;
    border: 1px solid var(--border-color);
    border-bottom: none;
    white-space: nowrap;
}

.template-progress {
    font-weight: 600;
    color: var(--text-primary);
    font-size: 0.85rem;
    white-space: nowrap;
}

.template-nav .btn-secondary {
    font-size: 0.85rem;
    padding: 8px 12px;
    white-space: nowrap;
}

.psalm-display {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-primary);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: background-color 0.3s;
}

#psalm-title {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 10px;
}

.psalm-topic {
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--accent-color);
}

.psalm-text {
    line-height: 1.8;
    color: var(--text-primary);
    font-size: 1.1rem;
}

.psalm-text.rtl {
    direction: rtl;
    text-align: justify;
}

.psalm-text p {
    margin-bottom: 15px;
    text-indent: 20px;
}

.verse-number {
    font-weight: bold;
    color: var(--accent-color);
    margin-right: 5px;
    text-indent: 0;
}

/* Psalm Tags Section */
.psalm-tags-section {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

.tags-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tags-header h3 {
    font-size: 1.1rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.add-tag-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1px solid var(--accent-color);
    background: transparent;
    color: var(--accent-color);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.add-tag-btn:hover {
    background-color: var(--accent-color);
    color: white;
}

.tags-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tag-chip {
    display: flex;
    align-items: center;
    gap: 6px;
    background-color: var(--bg-tertiary);
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    transition: all 0.2s;
}

.tag-chip:hover {
    border-color: var(--accent-color);
}

.tag-remove {
    cursor: pointer;
    font-size: 1.1rem;
    line-height: 1;
    color: var(--text-secondary);
}

.tag-remove:hover {
    color: var(--danger-color);
}

/* Psalm Tag Categories */
.psalm-tag-category {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.psalm-tag-category:last-child {
    margin-bottom: 0;
}

.psalm-tag-category-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    min-width: 70px;
}

/* Tags View */
.tags-search-container {
    margin-bottom: 15px;
}

.tags-search-input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 8px;
    font-size: 1rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    transition: border-color 0.3s, box-shadow 0.3s;
}

.tags-search-input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(74, 144, 217, 0.15);
}

.tags-search-input::placeholder {
    color: var(--text-secondary);
}

.tags-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding: 20px;
    background-color: var(--bg-primary);
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.tags-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    padding: 0 5px;
}

.btn-minimal {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 0.8rem;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
    text-decoration: underline;
}

.btn-minimal:hover {
    color: var(--accent-color);
    background-color: var(--bg-tertiary);
}

.btn-minimal.danger:hover {
    color: var(--danger-color);
}

.tag-pill {
    padding: 8px 16px;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 25px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
}

.tag-pill:hover {
    border-color: var(--accent-color);
    background-color: var(--bg-tertiary);
}

.tag-pill.active {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

/* Tag Category Sections */
.tag-category-section {
    width: 100%;
    margin-bottom: 16px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.tag-category-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.tag-category-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
}

.tag-category-name {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tag-category-count {
    background-color: var(--accent-color);
    color: white;
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 12px;
    font-weight: 500;
}

.tag-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.tagged-items-container {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tag-results-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tag-results-header h3 {
    margin: 0;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 5px;
}

.tag-results-section h3 {
    margin-bottom: 15px;
    font-size: 1.2rem;
    border-bottom: 2px solid var(--accent-color);
    display: inline-block;
    padding-bottom: 5px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.tag-results-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Dropdown styles */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-toggle {
    cursor: pointer;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 200px;
    max-height: 300px;
    overflow-y: auto;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: var(--shadow);
    z-index: 1000;
    margin-top: 4px;
}

.dropdown-menu.show {
    display: block;
}

.dropdown-item {
    padding: 10px 16px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid var(--border-color);
}

.dropdown-item:last-child {
    border-bottom: none;
}

.dropdown-item:hover {
    background-color: var(--bg-tertiary);
}

.tag-results-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 15px;
}

/* Templates List View */
.templates-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.templates-header h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
}

.templates-header .header-buttons {
    display: flex;
    gap: 10px;
}

.templates-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.template-card {
    background-color: var(--bg-primary);
    padding: 20px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border-left: 4px solid var(--accent-color);
}

.template-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.template-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 10px;
}

.template-title {
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 5px;
}

.template-date {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.template-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 15px;
    line-height: 1.5;
}

.template-psalms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 15px;
}

.template-psalm-tag {
    background-color: var(--bg-tertiary);
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
}

.template-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

/* Psalms Selection View (10x50 Grid) */
.selection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.selection-header h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
}

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

.selection-info {
    text-align: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: var(--bg-tertiary);
    border-radius: 6px;
}

.selection-info span {
    font-weight: bold;
    color: var(--accent-color);
    font-size: 1.2rem;
}

.psalms-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    gap: 6px;
    margin-bottom: 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.psalm-cell {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    cursor: pointer;
    font-weight: 500;
    font-size: 0.85rem;
    color: var(--text-primary);
    transition: all 0.2s;
    position: relative;
    padding: 2px;
}

.psalm-cell:hover {
    border-color: var(--accent-color);
    background-color: var(--bg-tertiary);
    transform: scale(1.05);
}

.psalm-cell.selected {
    background-color: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}

.psalm-cell.selected::after {
    content: '✓';
    position: absolute;
    top: 2px;
    right: 2px;
    font-size: 0.8rem;
    color: white;
}

.selection-footer {
    display: flex;
    justify-content: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Template Form View */
.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid var(--border-color);
}

.form-header h2 {
    font-size: 1.8rem;
    color: var(--text-primary);
}

.template-form {
    max-width: 800px;
    margin: 0 auto;
    background-color: var(--bg-primary);
    padding: 30px;
    border-radius: 8px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-primary);
    font-size: 0.95rem;
}

.form-input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: var(--accent-color);
}

.form-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    transition: border-color 0.3s;
    resize: vertical;
    font-family: inherit;
}

.form-textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.selected-psalms-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
    min-height: 50px;
}

.add-psalm-manual {
    display: flex;
    gap: 8px;
    margin-top: 8px;
    align-items: center;
}

.add-psalm-manual input {
    width: 180px;
}

.template-psalm-tag .remove-psalm-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0 0 0 4px;
    font-size: 1rem;
    line-height: 1;
    opacity: 0.6;
}

.template-psalm-tag .remove-psalm-btn:hover {
    color: #dc3545;
    opacity: 1;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
}

/* Buttons */
.btn-primary {
    padding: 10px 20px;
    background-color: var(--accent-color);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.btn-primary:disabled {
    background-color: var(--text-secondary);
    cursor: not-allowed;
    transform: none;
}

.btn-secondary {
    padding: 10px 20px;
    background-color: var(--bg-tertiary);
    color: var(--text-primary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-secondary:hover {
    background-color: var(--bg-secondary);
    border-color: var(--accent-color);
}

/* Tutorial button - subtle info style */
.btn-tutorial {
    padding: 8px 16px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    color: #495057;
    border: 1px dashed #adb5bd;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.btn-tutorial:hover {
    background: linear-gradient(135deg, #e3f2fd 0%, #bbdefb 100%);
    border-color: #2196f3;
    border-style: solid;
    color: #1565c0;
}

.btn-tutorial::before {
    content: '?';
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background: #6c757d;
    color: white;
    border-radius: 50%;
    font-size: 0.7rem;
    font-weight: bold;
}

/* Dark mode tutorial button */
body.dark-theme .btn-tutorial {
    background: linear-gradient(135deg, #2d3748 0%, #1a202c 100%);
    color: #a0aec0;
    border-color: #4a5568;
}

body.dark-theme .btn-tutorial:hover {
    background: linear-gradient(135deg, #2c5282 0%, #2b6cb0 100%);
    border-color: #4299e1;
    color: #bee3f8;
}

body.dark-theme .btn-tutorial::before {
    background: #4299e1;
}

.btn-small {
    padding: 6px 12px;
    font-size: 0.85rem;
}

.btn-icon {
    font-size: 1rem;
    line-height: 1;
}

/* Scrollbar Styling */
.sidebar::-webkit-scrollbar,
.main-content::-webkit-scrollbar {
    width: 8px;
}

.sidebar::-webkit-scrollbar-track,
.main-content::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

.sidebar::-webkit-scrollbar-thumb,
.main-content::-webkit-scrollbar-thumb {
    background: var(--accent-color);
    border-radius: 4px;
}

.sidebar::-webkit-scrollbar-thumb:hover,
.main-content::-webkit-scrollbar-thumb:hover {
    background: var(--accent-hover);
}

/* Responsive Design */
@media (max-width: 768px) {
    .content-wrapper {
        flex-direction: column;
    }
    
    .top-bar {
        padding: 0 10px;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        max-height: 0;
        overflow: hidden;
        position: fixed;
        top: var(--header-height);
        left: 0;
        right: 0;
        z-index: 1000;
        transition: max-height 0.3s ease;
        border-right: none;
        border-bottom: 1px solid var(--border-color);
    }
    
    .sidebar.mobile-visible {
        max-height: 85vh;
        overflow-y: auto;
    }

    .sidebar.mobile-visible .psalms-nav,
    .sidebar.collapsed.mobile-visible .psalms-nav {
        display: block !important;
    }

    .sidebar.mobile-visible .psalms-nav .category-header .category-title,
    .sidebar.mobile-visible .psalms-nav .category-header .category-toggle,
    .sidebar.mobile-visible .psalms-nav .category-header .sidebar-unfavorite-btn,
    .sidebar.mobile-visible .psalms-nav .category-header .template-psalm-count {
        display: inline !important;
    }

    .main-content {
        padding: 20px;
    }
    
    .psalm-display,
    .template-form {
        padding: 20px;
    }
    
    .top-bar h1 {
        font-size: 1.2rem;
        padding-left: 55px; /* Space for mobile toggle button */
    }
    
    .top-controls {
        gap: 6px;
        flex-wrap: nowrap;
    }
    
    .version-dropdown {
        padding: 6px 8px;
        font-size: 11px;
        max-width: 120px;
    }
    
    .theme-toggle {
        padding: 6px 8px;
        font-size: 1rem;
        flex-shrink: 0;
    }
    
    .notification-bell {
        padding: 6px;
    }
    
    .bell-icon {
        font-size: 1.1rem;
    }
    
    .notification-count {
        min-width: 16px;
        height: 16px;
        font-size: 0.6rem;
    }
    
    .notification-dropdown {
        width: 280px;
        right: -50px;
    }

    .tab-btn {
        padding: 6px 12px;
        font-size: 12px;
    }

    .psalms-grid {
        grid-template-columns: repeat(5, 1fr);
        gap: 6px;
    }

    .templates-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }

    .templates-header .header-buttons {
        flex-wrap: wrap;
        width: 100%;
    }

    .templates-header .header-buttons button {
        flex: 1;
    }

    .template-actions {
        flex-wrap: wrap;
    }

    .form-actions {
        flex-direction: column;
        padding-bottom: 80px;
    }

    .form-actions .btn-primary,
    .form-actions .btn-secondary {
        width: 100%;
    }
}

/* Mobile Toggle Button */
.mobile-toggle-btn {
    position: fixed;
    top: 8px;
    left: 10px;
    z-index: 1001;
    background-color: var(--bg-primary);
    border: 2px solid var(--border-color);
    border-radius: 6px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    box-shadow: var(--shadow);
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-toggle-btn:hover {
    border-color: var(--accent-color);
}

.menu-icon {
    font-size: 1.4rem;
    line-height: 1;
    color: var(--text-primary);
}

.mobile-toggle-btn.active .menu-icon {
    transform: rotate(90deg);
    display: inline-block;
}

/* Hide mobile toggle on desktop */
@media (min-width: 769px) {
    .mobile-toggle-btn {
        display: none;
    }
}

/* Personal Prayers Styles */
.prayers-subtitle {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.prayer-card {
    border-left-color: #9b59b6;
}

.prayer-preview {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin: 10px 0;
    padding: 10px;
    background-color: var(--bg-secondary);
    border-radius: 4px;
    line-height: 1.5;
}

.prayer-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin: 10px 0;
}

.prayer-tag {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
}

.prayer-display-text {
    font-size: 1.1rem;
    line-height: 1.8;
    white-space: pre-wrap;
}

/* Prayer Tags at Bottom */
.prayer-tags-bottom {
    margin-top: 24px;
    padding-top: 16px;
    border-top: 1px solid var(--border-color, #e0e0e0);
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

/* Prayer View Favorite Star */
.prayer-view-star {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 0 0 0 12px;
    vertical-align: middle;
    opacity: 0.6;
    transition: opacity 0.2s, transform 0.2s;
}

.prayer-view-star:hover {
    opacity: 1;
    transform: scale(1.2);
}

.prayer-view-star.favorited {
    opacity: 1;
}

/* Prayer Confirmed Time */
.prayer-confirmed-time {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 5px;
    padding: 6px 10px;
    background-color: rgba(39, 174, 96, 0.1);
    border-radius: 6px;
    font-size: 0.8rem;
}

.confirmed-time-icon {
    color: #27ae60;
}

.confirmed-time-datetime {
    color: var(--text-primary);
    font-weight: 500;
}

.confirmed-timezone-info {
    font-size: 0.7rem;
    color: var(--text-secondary);
    font-style: italic;
}

.prayer-countdown {
    background-color: #27ae60;
    color: white;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
    animation: pulse-countdown 2s infinite;
}

@keyframes pulse-countdown {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Schedule/Vote Button with pending vote alert */
.schedule-vote-btn.has-pending-vote {
    background-color: #9b59b6 !important;
    color: white !important;
    animation: pulse-schedule-btn 1.5s infinite;
    position: relative;
}

@keyframes pulse-schedule-btn {
    0%, 100% { 
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(155, 89, 182, 0.7);
    }
    50% { 
        transform: scale(1.02);
        box-shadow: 0 0 10px 3px rgba(155, 89, 182, 0.5);
    }
}

.template-prayers-count {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    margin-top: 8px;
    padding: 4px 10px;
    background-color: var(--bg-secondary);
    border-radius: 4px;
}

/* Selected Prayers in Template Form */
.selected-prayers-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    min-height: 40px;
    padding: 10px;
    background-color: var(--bg-secondary);
    border-radius: 4px;
    margin-bottom: 10px;
}

.prayer-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    background-color: #9b59b6;
    color: white;
    padding: 6px 12px;
    border-radius: 16px;
    font-size: 0.85rem;
}

.prayer-chip-title {
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.prayer-chip-remove {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    font-size: 1rem;
    padding: 0 4px;
    opacity: 0.8;
}

.prayer-chip-remove:hover {
    opacity: 1;
}

/* Prayer Selection Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background-color: var(--bg-primary);
    border-radius: 8px;
    padding: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.modal-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.modal-close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
    padding: 0;
    line-height: 1;
}

.modal-close-btn:hover {
    color: var(--text-primary);
}

.modal-body {
    padding: 10px 0;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.prayer-selection-list {
    max-height: 300px;
    overflow-y: auto;
}

.prayer-selection-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    margin-bottom: 8px;
    background-color: var(--bg-secondary);
    transition: all 0.2s;
}

.prayer-selection-item:hover {
    background-color: var(--bg-tertiary);
}

.prayer-selection-item.selected {
    background-color: rgba(155, 89, 182, 0.2);
    border: 1px solid #9b59b6;
}

.prayer-selection-checkbox {
    font-size: 1.2rem;
    color: var(--text-secondary);
}

.prayer-selection-item.selected .prayer-selection-checkbox {
    color: #9b59b6;
}

.prayer-selection-info {
    flex: 1;
}

.prayer-selection-title {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.prayer-selection-preview {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

/* Reminder Styles */
.reminder-section {
    background-color: var(--bg-secondary);
    padding: 15px;
    border-radius: 8px;
    margin-top: 10px;
}

.reminder-section > label {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0;
}

.reminder-label-text {
    font-weight: 600;
    color: var(--text-primary);
}

.reminder-toggle {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
}

.reminder-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--bg-tertiary);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.reminder-toggle input:checked + .toggle-slider {
    background-color: var(--accent-color);
}

.reminder-toggle input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.reminder-config {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.reminder-times label,
.reminder-recurrence label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.reminder-times-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 10px;
}

.reminder-time-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

.reminder-time-input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
}

.remove-time-btn {
    padding: 4px 10px;
}

.reminder-recurrence {
    margin-top: 15px;
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-size: 1rem;
    cursor: pointer;
}

.recurrence-options {
    margin-top: 15px;
}

.recurrence-options label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.days-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.day-checkbox {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background-color: var(--bg-secondary);
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.2s;
}

.day-checkbox:hover {
    background-color: var(--bg-tertiary);
}

.day-checkbox input:checked + span,
.day-checkbox:has(input:checked) {
    background-color: var(--accent-color);
    color: white;
}

.day-checkbox input {
    display: none;
}

/* Reminder Toast */
.reminder-toast {
    position: fixed;
    top: 20px;
    right: 20px;
    background-color: var(--bg-primary);
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    z-index: 1001;
    max-width: 350px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid var(--accent-color);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.reminder-toast-content {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 15px;
}

.reminder-toast-icon {
    font-size: 1.5rem;
}

.reminder-toast-text {
    flex: 1;
}

.reminder-toast-title {
    font-weight: 600;
    color: var(--text-primary);
}

.reminder-toast-template {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.reminder-toast-dismiss {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 1rem;
    padding: 4px;
}

.reminder-toast-dismiss:hover {
    color: var(--text-primary);
}

.reminder-toast-actions {
    display: flex;
    gap: 8px;
    padding: 0 15px 15px;
}

/* Template card reminder indicator */
.template-reminder-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background-color: var(--accent-color);
    color: white;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    margin-left: 8px;
}

/* Welcome Screen */
.welcome-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    z-index: 2000;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 15px 20px 20px;
    overflow-y: auto;
}

.welcome-screen.hidden {
    display: none;
}

/* Hide mobile toggle when welcome screen is visible */
.welcome-screen:not(.hidden) ~ .app-container .mobile-toggle-btn {
    display: none !important;
}

.welcome-content {
    max-width: 500px;
    width: 100%;
    text-align: center;
    padding: 20px 20px;
    margin-top: auto;
    margin-bottom: auto;
}

.splash-content {
    max-width: 500px;
    width: 100%;
    text-align: center;
    padding: 15px 20px;
}

.welcome-logo {
    font-size: 4rem;
    margin-bottom: 10px;
    animation: fadeInUp 0.6s ease;
}

.welcome-title {
    font-size: 2rem;
    color: var(--text-primary);
    margin-bottom: 15px;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.welcome-slogan {
    font-size: 1.2rem;
    font-style: italic;
    color: var(--accent-color);
    margin-bottom: 10px;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.welcome-subtitle {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 30px;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.welcome-features {
    text-align: left;
    margin-bottom: 30px;
}

.welcome-feature {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 15px;
    margin-bottom: 10px;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    animation: fadeInUp 0.6s ease both;
}

.welcome-feature:nth-child(1) { animation-delay: 0.4s; }
.welcome-feature:nth-child(2) { animation-delay: 0.5s; }
.welcome-feature:nth-child(3) { animation-delay: 0.6s; }
.welcome-feature:nth-child(4) { animation-delay: 0.7s; }

.feature-icon {
    font-size: 2rem;
    flex-shrink: 0;
}

.feature-text h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.feature-text p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.welcome-start-btn {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    animation: fadeInUp 0.6s ease 0.8s both;
    box-shadow: 0 4px 15px rgba(74, 144, 217, 0.3);
}

.welcome-start-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(74, 144, 217, 0.4);
}

.welcome-hint {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-top: 20px;
    animation: fadeInUp 0.6s ease 0.9s both;
}

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

/* Mobile adjustments for welcome screen */
@media (max-width: 480px) {
    .welcome-content {
        padding: 15px 15px;
    }
    
    .splash-content {
        padding: 10px 15px;
    }
    
    .welcome-logo {
        font-size: 4rem;
    }
    
    .welcome-title {
        font-size: 2rem;
    }
    
    .welcome-slogan {
        font-size: 1.25rem;
    }
    
    .welcome-subtitle {
        font-size: 1.1rem;
    }
    
    .welcome-feature {
        padding: 14px;
    }
    
    .feature-icon {
        font-size: 1.75rem;
    }
    
    .feature-text h3 {
        font-size: 1.1rem;
    }
    
    .feature-text p {
        font-size: 0.95rem;
    }
    
    .welcome-start-btn {
        padding: 14px 32px;
        font-size: 1.1rem;
    }
}

/* Sharing Styles */
.user-id-section {
    background: linear-gradient(135deg, var(--accent-color) 0%, var(--accent-hover) 100%);
    padding: 15px 20px;
    border-radius: 10px;
    margin-bottom: 15px;
    color: white;
}

.user-id-label {
    font-size: 0.85rem;
    opacity: 0.9;
    margin-bottom: 8px;
}

.user-id-value {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-id-value .form-input {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    background-color: white;
    font-size: 0.9rem;
    color: #333;
}

.user-id-value .form-input::placeholder {
    color: #999;
}

.user-id-hint {
    margin-top: 8px;
    font-size: 0.75rem;
    opacity: 0.8;
}

.user-id-hint code {
    font-family: monospace;
    font-size: 0.75rem;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 2px 6px;
    border-radius: 4px;
}

.user-id-value code {
    font-family: monospace;
    font-size: 0.9rem;
    background-color: rgba(255, 255, 255, 0.2);
    padding: 8px 12px;
    border-radius: 6px;
    flex: 1;
    word-break: break-all;
}

.user-id-section .btn-secondary {
    background-color: rgba(255, 255, 255, 0.2);
    color: white;
    border-color: rgba(255, 255, 255, 0.3);
}

.user-id-section .btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.3);
}

.user-id-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 15px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 15px;
    flex-wrap: wrap;
}

.user-id-info span {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.user-id-info code {
    font-family: monospace;
    font-size: 0.8rem;
    background-color: var(--bg-tertiary);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--accent-color);
    word-break: break-all;
}

.shared-prayer-card {
    border-left-color: #3498db;
}

.owned-shared-card {
    border-left-color: #27ae60;
}

.prayer-source-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    margin-left: 8px;
}

.prayer-source-badge.shared {
    background-color: #3498db;
    color: white;
}

.prayer-source-badge.owned {
    background-color: #27ae60;
    color: white;
}

.prayer-source-badge.pending {
    background-color: #f39c12;
    color: white;
}

/* Pending Invites Section */
.pending-invites-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    border: 2px dashed #f39c12;
}

.pending-invites-section .section-header {
    margin-bottom: 15px;
}

.pending-invites-section h3 {
    margin: 0;
    color: #f39c12;
    font-size: 1rem;
}

.pending-invite-card {
    border-left: 3px solid #f39c12 !important;
    background-color: rgba(243, 156, 18, 0.05);
}

.pending-invite-card .template-actions {
    justify-content: flex-start;
    gap: 10px;
}

/* Pending Votes Section */
.pending-votes-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    border: 2px dashed #9b59b6;
}

.pending-votes-section h3 {
    margin: 0 0 15px 0;
    color: #9b59b6;
    font-size: 1rem;
}

.vote-pending-card {
    border-left: 3px solid #9b59b6 !important;
    background-color: rgba(155, 89, 182, 0.05);
}

.vote-pending-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 10px;
    font-size: 0.7rem;
    background-color: #9b59b6;
    color: white;
    margin-left: 8px;
    animation: pulse-badge 2s infinite;
}

@keyframes pulse-badge {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.has-pending-votes {
    border-left: 3px solid #9b59b6 !important;
    box-shadow: 0 0 10px rgba(155, 89, 182, 0.3);
}

/* In Prayer Button State */
.start-praying-btn.in-prayer {
    background-color: #dc3545 !important;
    animation: pulse-prayer 2s infinite;
}

@keyframes pulse-prayer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.session-indicator {
    display: inline-block;
    margin-left: 10px;
    color: #dc3545;
    font-size: 0.85rem;
    font-weight: bold;
    animation: pulse-prayer 2s infinite;
}

/* Left Prayers Section (Rejoin) */
.left-prayers-section {
    margin-bottom: 20px;
    padding: 15px;
    background-color: var(--bg-secondary);
    border-radius: 10px;
    border: 2px dashed #95a5a6;
}

.left-prayers-section h3 {
    margin: 0 0 15px 0;
    color: #95a5a6;
    font-size: 1rem;
}

.left-prayer-card {
    border-left: 3px solid #95a5a6 !important;
    background-color: rgba(149, 165, 166, 0.05);
    opacity: 0.8;
}

.prayer-source-badge.left {
    background-color: #95a5a6;
    color: white;
}

/* Share Dialog */
.share-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
    padding: 20px;
}

.share-dialog {
    background-color: var(--bg-primary);
    border-radius: 12px;
    width: 100%;
    max-width: 450px;
    max-height: 80vh;
    overflow-y: auto;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.share-dialog-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.share-dialog-content {
    padding: 20px;
}

.share-user-id {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.share-user-id code {
    font-family: monospace;
    background-color: var(--bg-secondary);
    padding: 4px 8px;
    border-radius: 4px;
    color: var(--accent-color);
}

.share-instructions {
    font-size: 0.8rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.share-add-collaborator {
    margin-bottom: 20px;
}

.share-add-collaborator label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.share-input-row {
    display: flex;
    gap: 10px;
}

.share-input-row .form-input {
    flex: 1;
}

.share-collaborators {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.share-collaborators label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.collaborators-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.collaborator-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 12px;
    background-color: var(--bg-secondary);
    border-radius: 6px;
}

.collaborator-item span {
    font-family: monospace;
    font-size: 0.85rem;
    color: var(--text-primary);
}

.share-link-section {
    margin-top: 20px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
}

.share-link-section label {
    display: block;
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* Preset Templates Section */
.preset-templates-section {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 2px solid var(--border-color);
}

.preset-template-card {
    border-left: 3px solid var(--accent-color);
}

.preset-dropdown-row {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-top: 10px;
}

.preset-subsection-select {
    flex: 1;
    padding: 8px 12px;
    border-radius: 6px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
}

.preset-view-btn {
    flex-shrink: 0;
}

/* Favorite Star Styles */
.favorite-star {
    background: none;
    border: none;
    font-size: 1.4rem;
    cursor: pointer;
    padding: 5px 8px;
    transition: transform 0.2s, opacity 0.2s;
    opacity: 0.7;
    color: var(--text-secondary);
}

.favorite-star:hover {
    transform: scale(1.3);
    opacity: 1;
}

.favorite-star.favorited {
    opacity: 1;
    color: #ffc107;
}

/* Template Nav Favorite Button */
.template-favorite-btn {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    padding: 5px 10px;
    transition: transform 0.2s;
    opacity: 0.6;
}

.template-favorite-btn:hover {
    transform: scale(1.2);
    opacity: 1;
}

.template-favorite-btn.favorited {
    opacity: 1;
    color: #ffc107;
}

/* Sidebar Favorites Section */
.favorites-nav-header {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 15px;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid var(--border-color);
    border-top: 1px solid var(--border-color);
    background-color: var(--bg-secondary);
}

.favorites-nav-header:first-child {
    border-top: none;
}

.prayers-favorites-header {
    background-color: rgba(255, 193, 7, 0.1);
}

.favorites-header-icon {
    font-size: 1.1rem;
}

.favorites-header-text {
    font-size: 0.9rem;
}

.favorites-empty-state {
    padding: 20px;
    text-align: center;
}

.empty-favorites-hint {
    color: var(--text-secondary);
}

.empty-favorites-hint .empty-icon {
    font-size: 2rem;
    display: block;
    margin-bottom: 10px;
    opacity: 0.5;
}

.empty-favorites-hint p {
    margin: 5px 0;
}

.empty-favorites-hint .empty-hint {
    font-size: 0.85rem;
    opacity: 0.7;
}

.favorite-template-item {
    display: flex;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
    gap: 8px;
}

.favorite-template-item:hover {
    background-color: var(--bg-tertiary);
}

.favorite-template-title {
    flex: 1;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.favorite-template-count {
    font-size: 0.85rem;
    color: var(--text-secondary);
    background-color: var(--bg-tertiary);
    padding: 2px 8px;
    border-radius: 10px;
}

.favorite-prayer-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    padding: 10px 15px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-color);
    transition: background-color 0.2s;
    gap: 8px;
}

.favorite-prayer-item:hover {
    background-color: var(--bg-tertiary);
}

.favorite-prayer-title {
    flex: 1;
    font-size: 0.85rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.favorite-prayer-source {
    font-size: 0.7rem;
}

.favorite-prayer-source.shared {
    opacity: 0.7;
}

.favorite-prayer-source.owned {
    opacity: 0.7;
}

.favorite-prayer-time {
    width: 100%;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-top: 3px;
}

/* Highlight animation for card */
.highlight-card {
    animation: highlight-pulse 2s ease-out;
}

@keyframes highlight-pulse {
    0% { box-shadow: 0 0 0 3px var(--accent-color); }
    100% { box-shadow: 0 0 0 0px transparent; }
}

.template-psalm-count {
    font-size: 0.75rem;
    color: var(--text-secondary);
    background: var(--bg-tertiary);
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 8px;
}

.sidebar-unfavorite-btn {
    background: none;
    border: none;
    font-size: 1rem;
    cursor: pointer;
    padding: 3px 6px;
    color: #ffc107;
    opacity: 0.8;
    margin-left: auto;
    transition: opacity 0.2s, transform 0.2s;
}

.sidebar-unfavorite-btn:hover {
    opacity: 1;
    transform: scale(1.2);
}

/* Preset Parent Section */
#preset-templates-parent {
    margin: 0;
}
.preset-parent-header {
    padding: 10px 15px;
    background: var(--bg-tertiary, var(--bg-secondary));
    font-weight: 600;
}
.preset-parent-header .category-emoji {
    font-size: 1.1rem;
}

/* Presets Page Content */
.presets-content {
    padding: 20px;
    max-width: 800px;
    margin: 0 auto;
}

/* Preset Category Section (nested) */
.preset-category-section {
    border-bottom: 1px solid var(--border-color);
    margin: 0;
}

.preset-page-section {
    background: var(--bg-secondary);
    border-radius: 10px;
    margin-bottom: 15px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.preset-page-section .category-header {
    padding: 15px 20px;
    font-size: 1rem;
    background: var(--bg-tertiary);
}

.preset-page-section .category-subsections {
    padding: 10px 0;
}

.preset-page-section .subsection-psalms {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    padding: 10px 20px;
}

.preset-page-section .preset-play-all-btn {
    margin: 10px 20px;
    width: calc(100% - 40px);
}

.preset-category-header {
    padding: 8px 15px 8px 25px;
    font-size: 0.9rem;
}
.preset-subsection-header {
    cursor: pointer;
    padding-left: 35px;
}
.preset-play-btn {
    background: none;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 0.7rem;
    padding: 2px 6px;
    cursor: pointer;
    margin-left: auto;
    color: var(--text-secondary);
    transition: all 0.2s;
}
.preset-play-btn:hover {
    background: var(--accent-color);
    color: white;
    border-color: var(--accent-color);
}
.preset-play-all-btn {
    margin: 8px 15px 8px 25px;
    width: calc(100% - 50px);
    font-size: 0.85rem;
}

.prayer-nav-item {
    background-color: var(--accent-color) !important;
    color: white !important;
}

/* Settings View Styles */
.settings-section {
    background-color: var(--bg-secondary);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
}

.settings-section h3 {
    margin-bottom: 10px;
    color: var(--text-primary);
}

.settings-description {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-bottom: 15px;
}

.setting-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background-color: var(--bg-tertiary);
    border-radius: 8px;
    margin-bottom: 10px;
}

.setting-info {
    flex: 1;
    margin-right: 15px;
}

.setting-label {
    display: block;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.setting-hint {
    display: block;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-switch .toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: var(--border-color);
    transition: 0.3s;
    border-radius: 26px;
}

.toggle-switch .toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
}

.toggle-switch input:checked + .toggle-slider {
    background-color: var(--accent-color);
}

.toggle-switch input:checked + .toggle-slider:before {
    transform: translateX(24px);
}

.backup-info {
    background-color: var(--bg-tertiary);
    padding: 10px 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    justify-content: space-between;
}

.backup-label { color: var(--text-secondary); font-size: 0.9rem; }
#last-backup-time { color: var(--text-primary); font-weight: 500; }

.backup-actions { display: flex; flex-direction: column; gap: 20px; }
.backup-group h4 { color: var(--text-primary); margin-bottom: 10px; font-size: 0.9rem; }
.backup-group { display: flex; flex-direction: column; gap: 10px; }
.backup-group button { width: 100%; }

.danger-zone { border: 2px solid #dc3545; background-color: rgba(220, 53, 69, 0.1); }
.danger-zone h3 { color: #dc3545; }

.btn-danger {
    background-color: #dc3545;
    color: white;
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-weight: 500;
}
.btn-danger:hover { background-color: #c82333; }

/* Toast notification */
.toast {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    padding: 12px 24px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    z-index: 9999;
}
.toast.error { background-color: #dc3545; color: white; }

/* Cloud Backup Section */
.cloud-section {
    border: 2px solid var(--accent-color);
    background: linear-gradient(135deg, rgba(74, 144, 217, 0.1) 0%, rgba(74, 144, 217, 0.05) 100%);
}

.cloud-section h3 {
    color: var(--accent-color);
}

/* Collaborative Scheduling Styles */
.proposed-times-list {
    max-height: 300px;
    overflow-y: auto;
}

.proposed-time-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 8px;
}

.time-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.time-datetime {
    font-weight: 500;
    color: var(--text-primary);
}

.time-note {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.time-timezone {
    font-size: 0.75rem;
    color: var(--text-secondary);
    opacity: 0.8;
}

.time-proposer-timezone {
    font-size: 0.75rem;
    color: var(--accent-color);
    font-style: italic;
}

.timezone-hint {
    display: block;
    margin-top: 4px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.time-status {
    font-size: 0.8rem;
    padding: 2px 6px;
    border-radius: 4px;
}

.time-status.confirmed {
    background-color: #28a745;
    color: white;
}

.time-status.past {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
}

.time-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.vote-btn {
    min-width: 60px;
}

.vote-btn.voted {
    background-color: var(--accent-color);
    color: white;
}

.session-participants {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin: 15px 0;
}

.participant-badge {
    background-color: var(--accent-color);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.85rem;
}

.session-indicator {
    background-color: #dc3545;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    margin-left: 8px;
}

.shared-prayer-card,
.owned-shared-card {
    border-left: 3px solid var(--accent-color);
}

/* Psalm Template Actions */
.psalm-template-actions {
    margin-top: 30px;
    padding: 20px;
    background-color: var(--bg-secondary);
    border-radius: 10px;
}

.psalm-template-actions h3 {
    margin-bottom: 15px;
    color: var(--text-primary);
}

.psalm-actions-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

/* Template Selection Modal */
.template-selection-list {
    max-height: 400px;
    overflow-y: auto;
}

.template-select-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 8px;
}

.template-select-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.template-select-info strong {
    color: var(--text-primary);
}

.template-select-info span {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

@media (max-width: 480px) {
    .settings-section { padding: 15px; }
    .backup-actions { gap: 15px; }
    
    .proposed-time-item {
        flex-direction: column;
        gap: 10px;
    }
    
    .time-actions {
        width: 100%;
        justify-content: flex-end;
    }
    
    .psalm-actions-buttons {
        flex-direction: column;
    }
    
    .psalm-actions-buttons button {
        width: 100%;
    }
    
    .template-select-item {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
}

/* Build Manually View */
#build-manual-view {
    max-width: 640px;
    margin: 0 auto;
}

#build-manual-view .view-header {
    text-align: center;
    margin-bottom: 20px;
}

.build-manual-actions {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 15px;
}

#build-manual-view .selection-info {
    margin-bottom: 15px;
}

#build-manual-view .psalms-grid {
    margin: 0 auto 20px;
}

.build-manual-footer {
    display: flex;
    justify-content: center;
    gap: 15px;
    padding-top: 15px;
    border-top: 1px solid var(--border-color);
    max-width: 600px;
    margin: 0 auto;
}

.build-manual-footer button {
    min-width: 150px;
}

/* Template Select List in Modal */
.template-select-list {
    max-height: 300px;
    overflow-y: auto;
    margin-top: 15px;
}

.template-select-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    background-color: var(--bg-secondary);
    border-radius: 8px;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.template-select-item:hover {
    background-color: var(--accent-color);
    color: white;
}

.template-select-name {
    font-weight: 500;
}

.template-select-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.template-select-item:hover .template-select-info {
    color: rgba(255, 255, 255, 0.8);
}

/* ==================== Tutorial Overlay ==================== */
.tutorial-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    pointer-events: none;
}

.tutorial-overlay.hidden {
    display: none;
}

.tutorial-overlay.active {
    pointer-events: auto;
}

.tutorial-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    transition: opacity 0.3s;
}

.tutorial-spotlight {
    position: absolute;
    border-radius: 8px;
    box-shadow: 0 0 0 9999px rgba(0, 0, 0, 0.7);
    transition: all 0.4s ease;
    pointer-events: none;
}

.tutorial-tooltip {
    position: absolute;
    background: var(--bg-primary, #fff);
    border-radius: 12px;
    padding: 20px;
    max-width: 350px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    transition: all 0.4s ease;
    pointer-events: auto;
}

.tutorial-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.tutorial-step-indicator {
    font-size: 0.8rem;
    color: var(--text-secondary, #666);
    font-weight: 500;
}

.tutorial-skip-btn {
    background: none;
    border: none;
    color: var(--text-secondary, #666);
    cursor: pointer;
    font-size: 0.85rem;
    padding: 4px 8px;
    border-radius: 4px;
    transition: all 0.2s;
}

.tutorial-skip-btn:hover {
    background: var(--bg-secondary, #f0f0f0);
    color: var(--text-primary, #333);
}

.tutorial-content {
    margin-bottom: 20px;
}

.tutorial-icon {
    font-size: 2.5rem;
    margin-bottom: 10px;
    text-align: center;
}

.tutorial-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    color: var(--text-primary, #333);
}

.tutorial-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary, #555);
}

.tutorial-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
}

.tutorial-dots {
    display: flex;
    gap: 6px;
}

.tutorial-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--border-color, #ddd);
    transition: all 0.3s;
}

.tutorial-dot.active {
    background: var(--accent-color, #3498db);
    transform: scale(1.2);
}

.tutorial-dot.completed {
    background: var(--success-color, #27ae60);
}

.tutorial-btn {
    padding: 8px 20px;
    border-radius: 6px;
    border: none;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s;
}

.tutorial-back-btn {
    background: var(--bg-secondary, #f0f0f0);
    color: var(--text-primary, #333);
}

.tutorial-back-btn:hover {
    background: var(--bg-tertiary, #e0e0e0);
}

.tutorial-back-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.tutorial-next-btn {
    background: var(--accent-color, #3498db);
    color: white;
}

.tutorial-next-btn:hover {
    filter: brightness(1.1);
}

.tutorial-highlight {
    position: relative;
    z-index: 10001 !important;
    animation: tutorial-pulse 2s infinite;
}

@keyframes tutorial-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(52, 152, 219, 0.4); }
    50% { box-shadow: 0 0 0 8px rgba(52, 152, 219, 0); }
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .tutorial-tooltip {
        max-width: calc(100vw - 40px);
        left: 20px !important;
        right: 20px !important;
        bottom: 20px !important;
        top: auto !important;
    }
}
