/* yOu-v2 App Styles */

/* Google Fonts - Space Grotesk */
@import url('https://fonts.googleapis.com/css2?family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* Global scrollbar hiding for all browsers */
* {
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

*::-webkit-scrollbar {
    display: none; /* Chrome, Safari, Opera */
}

html, body {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

/* ========================================
   GLOBAL SITE-WIDE STYLES
   ======================================== */

/* Remove underlines from ALL links site-wide */
a {
    text-decoration: none;
}

a:hover {
    text-decoration: none;
}

/* ========================================
   GLOBAL SITE-WIDE CONTAINER STYLES
   All pages use 1024px max-width
   ======================================== */

/* Apply to ALL container classes across the site */
.container,
.dashboard-container,
.admin-container,
.journey-container,
.appreciate-container,
.home-container,
.editor-container,
.editor-container-full,
.article-container {
    max-width: 1024px !important;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

/* Responsive breakpoints for ALL containers */
@media (min-width: 1025px) {
    .container,
    .dashboard-container,
    .admin-container,
    .journey-container,
    .appreciate-container,
    .home-container,
    .editor-container,
    .editor-container-full,
    .article-container {
        max-width: 1024px;
    }
}

@media (min-width: 769px) and (max-width: 1024px) {
    .container,
    .dashboard-container,
    .admin-container,
    .journey-container,
    .appreciate-container,
    .home-container,
    .editor-container,
    .editor-container-full,
    .article-container {
        width: 100%;
        padding: 20px 40px;
    }
}

@media (max-width: 768px) {
    .container,
    .dashboard-container,
    .admin-container,
    .journey-container,
    .appreciate-container,
    .home-container,
    .editor-container,
    .editor-container-full,
    .article-container {
        width: 100%;
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .container,
    .dashboard-container,
    .admin-container,
    .journey-container,
    .appreciate-container,
    .home-container,
    .editor-container,
    .editor-container-full,
    .article-container {
        width: 100%;
        padding: 15px;
    }
}

/* Responsive Journal Layout for Mobile */
@media (max-width: 768px) {
    .entry-box-content {
        flex-direction: column;
    }

    .entry-box-content .entry-thumbnail {
        order: 1; /* Move thumbnail to top */
        width: 100%;
        height: 150px;
        margin-left: 0;
        margin-bottom: 15px;
    }

    .entry-box-content .entry-box-main-content {
        order: 2; /* Move text content below thumbnail */
    }

    .entry-box {
        display: flex;
        flex-direction: column;
    }

    /* Use display:contents to make grandchildren act as direct children of the flex container */
    .entry-box-content {
        display: contents;
    }

    .entry-box .entry-thumbnail {
        order: 1; /* Thumbnail on top */
        width: 100%;
        height: 150px;
        margin-bottom: 15px;
        margin-left: 0; /* Override desktop style */
    }

    .entry-box .entry-box-header {
        order: 2; /* Header second */
    }

    .entry-box .entry-box-main-content {
        order: 3; /* Main text content last */
    }
}


/* Journal Entry Box Layout */
.entry-box-main-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
    min-height: 100px; /* Ensure a minimum height for alignment */
}

.entry-title {
    font-weight: bold;
    margin-bottom: 8px;
}

.entry-preview {
    flex-grow: 1; /* Allow preview to take up available space */
}

.status-badge {
    align-self: flex-start; /* Align pill to the bottom-left */
    margin-top: auto; /* Push to the bottom */
}

/* Partner Draft Privacy */
.entry-box-content.partner-draft.no-click {
    cursor: default;
}


/* ========================================
   QUILL EDITOR BASE STYLES - Edit Mode Only
   ======================================== */

/* Quill Editor Placeholder - Edit Mode */
#editorModeElements .ql-editor.ql-blank::before {
    position: absolute;
    left: 15px;
    right: 15px;
    top: 55px;
    color: var(--text-muted);
    font-style: italic;
    pointer-events: none;
    content: attr(data-placeholder);
}

@media (min-width: 768px) {
    #editorModeElements .ql-editor.ql-blank::before {
        top: 65px;
    }
}

#editorModeElements .ql-container {
    position: relative;
}

#editorModeElements .ql-editor {
    position: relative;
    padding: 15px;
    min-height: 200px;
    line-height: 1.6;
}

/* Theme Variables */
:root {
    /* Dark Theme (Night Mode) - DEFAULT */
    --bg-page: #1a1a1a;
    --bg-gradient: #1a1a1a;
    --bg-primary: #2a2a2a;
    --bg-secondary: #333333;
    --bg-tertiary: #404040;
    --text-primary: #e0e0e0;
    --text-secondary: #b0b0b0;
    --text-muted: #808080;
    --border-color: #505050;
    --border-light: #454545;
    --shadow: rgba(0,0,0,0.5);
    --shadow-light: rgba(0,0,0,0.3);
    --accent-primary: #667eea;
    --accent-secondary: #764ba2;
    --primary-color: #667eea;
    --primary-hover: #5a6fd8;
    --success: #28a745;
    --warning: #ff6b35;
    --danger: #dc3545;
}

/* Light Theme (Day Mode) */
[data-theme="light"] {
    --bg-page: #ffffff;
    --bg-gradient: #ffffff;
    --bg-primary: #ffffff;
    --bg-secondary: #f8f9fa;
    --bg-tertiary: #f0f0f0;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-muted: #999999;
    --border-color: #ddd;
    --border-light: #eee;
    --shadow: rgba(0,0,0,0.1);
    --shadow-light: rgba(0,0,0,0.05);
    --accent-primary: #7c8adb;
    --accent-secondary: #8a6fb0;
    --primary-color: #7c8adb;
    --primary-hover: #6c7acc;
    --success: #4caf50;
    --warning: #ff7043;
    --danger: #f44336;
}

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

/* Responsive Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Global text color transitions - slow (3s) for smooth theme switching */
h1, h2, h3, h4, h5, h6, p, span, div, a, button, input, textarea, label {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    transition: color 3s ease;
}

/* Font weight hierarchy */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700; /* Bold for titles */
}

p, span, div, label {
    font-weight: 300; /* Light for body text */
}

button {
    font-weight: 500; /* Medium for buttons */
}

input, textarea {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 300; /* Light for form fields */
}

/* Global background transitions - fast (0.3s) to keep responsiveness */
* {
    transition: background-color 0.3s ease, background 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

body {
    font-family: 'Space Grotesk', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-weight: 300;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-page);
    margin: 0;
    padding: 0;
    transition: background 0.3s ease, color 3s ease;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Dashboard Styles */
.dashboard-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
    transition: all 0.3s ease;
}

/* Timer page specific - full viewport */
.timer-main ~ .dashboard-container,
.dashboard-container:has(.timer-main) {
    height: 100vh;
    overflow: hidden;
    padding: 20px 20px 0 20px;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    flex-wrap: wrap;
}

.nav-header {
    flex-wrap: nowrap;
}

.dashboard-logo {
    display: flex;
    align-items: center;
}

.dashboard-logo img {
    filter: none;
}

/* Change logo color in light mode */
[data-theme="light"] .dashboard-logo img {
    filter: brightness(0) saturate(100%) invert(7%) sepia(0%) saturate(0%) hue-rotate(0deg) brightness(95%) contrast(92%);
}

/* DASHBOARD: Force white colors for nav items and logo - always dark mode */
body[data-nav-page="dashboard"] .dashboard-logo img {
    filter: none !important;
}

body[data-nav-page="dashboard"] .header-actions .nav-email {
    color: #ffffff !important;
}

body[data-nav-page="dashboard"] .header-actions .logout-link {
    color: #ffffff !important;
}

body[data-nav-page="dashboard"] .header-actions .nav-action {
    color: #ffffff !important;
}

body[data-nav-page="dashboard"] .header-actions .nav-admin {
    color: #ffffff !important;
}

.dashboard-header h1 {
    color: var(--accent-primary);
    margin: 0;
    font-size: 2.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

.nav-wrapper {
    width: 100%;
}

.nav-container {
    padding-top: 20px;
    padding-bottom: 0;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-left: auto;
    order: 2;
}

.header-actions .navbar-timer {
    order: 0;
}

.header-actions .theme-toggle {
    order: 1;
}

.header-actions .nav-email {
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 500;
    white-space: nowrap;
    order: 2;
}

.header-actions .logout-link {
    order: 3;
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
}

.header-actions .nav-action {
    color: var(--text-primary);
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.header-actions .nav-action:hover {
    opacity: 0.8;
}


.header-actions .nav-admin {
    display: none; /* Shown via JS for admin */
    order: 4;
}

/* Mobile/Desktop visibility toggles */
.mobile-only {
    display: none !important;
}

.desktop-only {
    display: flex !important;
}

.mobile-hidden {
    display: flex !important;
}

@media (max-width: 768px) {
    .header-actions {
        gap: 12px;
        margin-left: auto;
        justify-content: flex-end;
    }

    .mobile-only {
        display: flex !important;
    }

    .desktop-only {
        display: none !important;
    }

    .mobile-hidden {
        display: none !important;
    }

    .nav-header {
        flex-wrap: nowrap;
    }

    .hamburger-menu {
        margin-left: 12px;
    }
}

/* Dashboard-specific nav adjustments */
/* Removed to allow theme toggle on all pages */

/* Hamburger menu icon */
.hamburger-menu {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hamburger-menu i {
    color: var(--text-primary);
    font-size: 24px;
}

@media (min-width: 769px) {
    .mobile-only {
        display: none !important;
    }
}

/* Mobile menu overlay */
.mobile-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

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

/* Mobile menu sidebar */
.mobile-menu {
    position: fixed;
    top: 0;
    right: -280px;
    width: 280px;
    height: 100vh;
    background: var(--bg-primary);
    z-index: 10000;
    display: flex;
    flex-direction: column;
    transition: right 0.3s ease;
    box-shadow: -2px 0 10px rgba(0, 0, 0, 0.2);
}

.mobile-menu.active {
    right: 0;
}

/* Mobile menu header with close button */
.mobile-menu-header {
    display: flex;
    justify-content: flex-end;
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
}

.mobile-menu-close {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    color: var(--text-primary);
    font-size: 24px;
}

/* Mobile menu items */
.mobile-menu-items {
    flex: 1;
    padding: 20px 0;
    display: flex;
    flex-direction: column;
}

.mobile-menu-item {
    padding: 15px 20px;
    cursor: pointer;
    transition: background 0.2s ease;
    text-align: left;
}

.mobile-menu-item:hover {
    background: var(--bg-secondary);
}

.mobile-menu-item span {
    color: var(--text-primary);
    font-weight: 500;
    font-size: 16px;
}

.mobile-menu-item.theme-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mobile-menu-item.theme-item i {
    font-size: 18px;
}

/* Email item - not clickable, no hover, always at bottom */
.mobile-menu-item.mobile-menu-email {
    cursor: default;
    margin-top: auto;
    padding: 10px 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    min-height: 44px;
}

.mobile-menu-item.mobile-menu-email:hover {
    background: transparent;
}

.mobile-menu-item.mobile-menu-email span {
    color: var(--text-secondary);
    font-weight: 400;
    font-size: 14px;
}

/* Mobile menu footer */
.mobile-menu-footer {
    padding: 15px 20px;
    border-top: none;
    text-align: left;
    background: transparent;
}

.mobile-menu-footer p {
    margin: 0;
    padding: 2px 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

/* Desktop page footer */
.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 15px 20px;
    text-align: center;
    background: transparent;
    border-top: none;
    z-index: 10;
}

.page-footer p {
    margin: 0;
    padding: 2px 0;
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.5;
}

/* Hide page footer on mobile (nav has it) */
@media (max-width: 768px) {
    .page-footer {
        display: none;
    }
}

/* Theme Toggle Button */
.theme-toggle {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    user-select: none;
    order: 2;
    position: relative;
    z-index: 100;
}

.theme-toggle:hover {
    background: var(--bg-tertiary);
    transform: translateY(-1px);
}

.theme-toggle-icon {
    font-size: 16px;
    transition: transform 0.3s ease;
}

[data-theme="dark"] .theme-toggle-icon {
    transform: rotate(180deg);
}

.dashboard-main {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

/* Feature Cards - Glass Material */
.feature-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.feature-card {
    /* Glassmorphism effect */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    color: white;
    padding: 25px;
    border-radius: 15px;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

/* All cards use same glass material - no individual styling needed */

.card-icon {
    font-size: 3rem;
    margin-bottom: 15px;
    display: block;
}

.card-number {
    font-size: 5rem;
    font-weight: 700;
    margin-bottom: 20px;
    font-family: 'Space Grotesk', sans-serif;
    opacity: 0.95;
}

.feature-card h3 {
    margin: 0 0 10px 0;
    font-size: 1.5rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

.feature-card p {
    margin: 0 0 15px 0;
    opacity: 0.9;
    font-size: 1rem;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
}

.card-stats {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-top: 10px;
}

.notification-pill {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.9);
    color: #667eea;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
    min-width: 20px;
    text-align: center;
}

/* Partner Status & Recent Activity */
.partner-status, .recent-activity {
    background: var(--bg-secondary);
    padding: 25px;
    border-radius: 10px;
    border-left: 4px solid var(--accent-primary);
    transition: all 0.3s ease;
}

.partner-status h2, .recent-activity h2 {
    color: var(--accent-primary);
    margin: 0 0 20px 0;
    background: var(--bg-primary);
    gap: 15px;
    padding: 15px;
    background: transparent;
    border-radius: 8px;
    margin-bottom: 25px;
    transition: all 0.3s ease;
}

.activity-item.draft {
    border-left: none;
}

.activity-item[onclick]:hover {
    background: inherit;
}

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

.activity-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

.activity-content p {
    margin: 0 0 5px 0;
}

.activity-title {
    color: #667eea;
    font-weight: 500;
}

.activity-date {
    color: #666;
    font-size: 0.9rem;
}

.container {
    background: var(--bg-primary);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    padding: 40px;
    width: 100%;
    max-width: 400px;
    margin: 50px auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.home-container {
    max-width: 1024px !important;
    width: 100%;
    box-sizing: border-box;
}

.container form {
    text-align: left;
}

.container form .form-group {
    text-align: left;
}

.container p {
    text-align: left;
}

.admin-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
}

.logo {
    font-size: 2.5rem;
    font-weight: bold;
    color: #667eea;
    margin-bottom: 10px;
}

.subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 1.1rem;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

/* Landing page button spacing */
.container .form-group {
    margin-bottom: 30px;
    text-align: center;
}

/* Reduce spacing between login form fields */
.container form .form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 5px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    color: #1a1a1a;
}

/* Homepage form labels - white text */
html[data-theme="dark"] .home-container .form-group label {
    color: #ffffff;
}

.form-group input {
    width: 100%;
    height: 52px;
    padding: 0 15px;
    
    /* Glassmorphism effect */
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.37);
    
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 400;
    font-size: 16px;
    color: #1a1a1a;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input::placeholder {
    color: rgba(26, 26, 26, 0.5);
}

.form-group input[type="password"] {
    font-size: 24px;
    letter-spacing: 2px;
}

.form-group input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 12px 40px 0 rgba(0, 0, 0, 0.5);
}

.btn {
    width: 100%;
    height: 52px;
    padding: 0 12px;
    
    /* Glassmorphism with blue tint */
    background: rgba(0, 6, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 6, 255, 0.3);
    box-shadow: 0 8px 32px 0 rgba(0, 6, 255, 0.2);
    
    color: white;
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 500;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    margin-bottom: 15px;
    text-decoration: none;
    box-sizing: border-box;
}

.btn:hover {
    transform: translateY(-2px);
    background: rgba(0, 6, 255, 0.25);
    border: 1px solid rgba(0, 6, 255, 0.5);
    box-shadow: 0 12px 40px 0 rgba(0, 6, 255, 0.4);
}

.btn-secondary {
    background: var(--bg-secondary);
    color: var(--accent-primary);
    border: 2px solid var(--accent-primary);
}
.btn-tertiary {
    background: transparent;
    color: var(--accent-primary);
    border: none;
    padding: 8px 16px;
    font-weight: 400;
    text-decoration: none;
}

.btn-tertiary:hover {
    opacity: 0.8;
    transform: none;
    text-decoration: none;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger) 0%, #dc2626 100%);
}

.btn-small {
    width: auto;
    padding: 8px 16px;
    font-size: 14px;
    margin: 0 5px;
}

.btn-share {
    background: #ff6b35 !important;
    color: white !important;
    border: none !important;
}

.btn-share:hover {
    background: #e55a2b !important;
    transform: translateY(-2px);
}

.btn-back {
    background: transparent !important;
    color: var(--text-primary) !important;
    border: 2px solid var(--text-primary) !important;
}

.btn-back:hover {
    background: var(--text-primary) !important;
    color: var(--bg-primary) !important;
    transform: translateY(-2px);
}

.link {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.link:hover {
    text-decoration: none;
    opacity: 0.8;
}

.error {
    background: #fee;
    color: #c33;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #fcc;
}

.success {
    background: #efe;
    color: #363;
    padding: 10px;
    border-radius: 5px;
    margin-bottom: 15px;
    border: 1px solid #cfc;
}

/* Admin Dashboard Styles */
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #e1e5e9;
}

.admin-nav {
    display: flex;
    gap: 20px;
}

.nav-btn {
    padding: 10px 20px;
    background: #f8f9fa;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.nav-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 20px;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #667eea;
}

.stat-label {
    color: #666;
    margin-top: 5px;
}

.section {
    background: white;
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.section-title {
    font-size: 1.5rem;
    margin-bottom: 20px;
    color: #333;
}

.table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
}

.table th,
.table td {
    padding: 12px;
    text-align: left;
    border-bottom: 1px solid #e1e5e9;
}

.table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #555;
}

.search-box {
    width: 100%;
    max-width: 300px;
    padding: 10px 15px;
    border: 2px solid #e1e5e9;
    border-radius: 8px;
    margin-bottom: 20px;
}

.hidden {
    display: none;
}

/* Journal Page Styles */
.journey-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 20px;
    width: 100%;
    box-sizing: border-box;
    background: transparent;
    border-radius: 0;
    box-shadow: none;
}

.journey-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.header-left h1 {
    color: #667eea;
    margin: 0;
    font-size: 2.2rem;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.journal-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    align-items: start;
}

/* Journal Editor */
.journal-editor {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    border: 4px solid #28a745; /* Default green for draft */
    transition: border-color 0.3s ease;
}

/* Journal Editor - Shared State */
.journal-editor.shared {
    border-color: #FF6B35; /* Orange for shared */
}

/* Journal Editor - Draft State */
.journal-editor.draft {
    border-color: #28a745; /* Green for draft */
}

.editor-header {
    margin-bottom: 20px;
}

.title-input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1.1rem;
    margin-bottom: 15px;
    background: white;
}

.editor-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 15px;
}

.toggle-switch {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

.toggle-switch input[type="checkbox"] {
    display: none;
}

.slider {
    position: relative;
    width: 50px;
    height: 24px;
    background-color: #ccc;
    border-radius: 24px;
    transition: 0.3s;
}

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

input:checked + .slider {
    background-color: #667eea;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

.toggle-label {
    font-weight: 500;
    color: #333;
}

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

.editor-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.status-message {
    font-size: 0.9rem;
    padding: 5px 10px;
    border-radius: 4px;
}

.status-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.word-count {
    font-size: 0.9rem;
    color: #666;
}

/* Journal Entries */
.journal-entries, .shared-feed {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    border-left: 4px solid #667eea;
}

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

.entries-header h2 {
    color: #667eea;
    margin: 0;
    font-size: 1.5rem;
}

.filter-tabs {
    display: flex;
    gap: 5px;
}

.tab-btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    background: white;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.tab-btn:hover {
    background: #f0f0f0;
}

.tab-btn.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.entries-list, .shared-entries {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-height: 600px;
    overflow-y: auto;
}

.entry-card, .shared-entry-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

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

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

.entry-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.entry-meta {
    display: flex;
    align-items: center;
    gap: 10px;
}

.status-badge {
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    text-transform: uppercase;
}

.status-badge.draft {
    background: #28a745;
    color: white;
}

.status-badge.shared {
    background: #FF6B35;
    color: white;
}

.status-badge.private {
    background: #f8d7da;
    color: #721c24;
}

.new-badge {
    background: #28a745;
    color: white;
    padding: 2px 6px;
    border-radius: 10px;
    font-size: 0.7rem;
    font-weight: bold;
}

.view-count {
    font-size: 0.8rem;
    color: #666;
}

.entry-preview, .shared-preview {
    color: #666;
    line-height: 1.5;
    margin-bottom: 15px;
}

.entry-footer, .shared-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 10px;
    border-top: 1px solid #f0f0f0;
}

.entry-date, .shared-date {
    font-size: 0.9rem;
    color: #666;
}

.entry-actions {
    display: flex;
    gap: 8px;
}

.btn-small {
    padding: 5px 10px;
    font-size: 0.8rem;
    border: 1px solid #ddd;
    background: white;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-small:hover {
    background: #f0f0f0;
}

.btn-small.btn-danger {
    color: #dc3545;
    border-color: #dc3545;
}

.btn-small.btn-danger:hover {
    background: #dc3545;
    color: white;
}

.author-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.author {
    font-weight: bold;
    color: #667eea;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .journal-content {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

@media (max-width: 768px) {
    .journey-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .header-left {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
    
    .editor-controls {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .entries-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
}

/* Entry View Page Styles */
.entry-container {
    max-width: 900px;
    margin: 0 auto;
    padding: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #f0f0f0;
}

.entry-content {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.entry-article {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 30px;
    border-left: 4px solid #667eea;
}

.entry-loading {
    text-align: center;
    padding: 40px;
    color: #666;
}

.entry-meta-header {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid #ddd;
}

.entry-info h1 {
    color: #333;
    margin: 0 0 15px 0;
    font-size: 2.2rem;
    line-height: 1.3;
}

.entry-meta-details {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.author {
    color: #667eea;
    font-weight: 600;
}

.date {
    color: #666;
    font-size: 0.9rem;
}

.view-stats {
    color: #666;
    font-size: 0.9rem;
    margin-top: 10px;
}

.entry-body {
    line-height: 1.8;
    font-size: 1.1rem;
    color: #333;
    margin-bottom: 30px;
}

.entry-body h1, .entry-body h2, .entry-body h3 {
    color: #667eea;
    margin-top: 30px;
    margin-bottom: 15px;
}

.entry-body p {
    margin-bottom: 15px;
}

.entry-body blockquote {
    border-left: 4px solid #667eea;
    padding-left: 20px;
    margin: 20px 0;
    font-style: italic;
    color: #666;
}

.entry-reactions {
    padding-top: 20px;
    border-top: 1px solid #ddd;
}

.existing-reactions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.reaction-display {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 20px;
    padding: 6px 12px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    user-select: none;
}

.reaction-display:hover {
    background: #e9ecef;
    border-color: #667eea;
}

.reaction-display.user-reacted {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.reaction-display.user-reacted:hover {
    background: #5a6fd8;
}

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

.reaction-btn {
    background: white;
    border: 2px solid #f0f0f0;
    border-radius: 25px;
    padding: 8px 15px;
    font-size: 1.2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.reaction-btn:hover {
    border-color: #667eea;
    transform: scale(1.1);
}

/* Comments Section */
.comments-section {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    border-left: 4px solid #667eea;
}

.comments-section h3 {
    color: #667eea;
    margin: 0 0 20px 0;
    font-size: 1.5rem;
}

.add-comment {
    background: white;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.add-comment textarea {
    width: 100%;
    min-height: 80px;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    resize: vertical;
    margin-bottom: 15px;
}

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

.btn-outline {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-weight: 500;
}

.btn-outline:hover {
    background: #667eea;
    color: white;
}

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

.no-comments {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 30px;
}

.comment-card {
    background: white;
    padding: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

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

.comment-author {
    font-weight: 600;
    color: #667eea;
}

.comment-date {
    font-size: 0.9rem;
    color: #666;
}

.comment-text {
    line-height: 1.6;
    margin-bottom: 15px;
    color: #333;
}

.comment-reactions {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.comment-reaction {
    background: #f0f0f0;
    border: 1px solid #ddd;
    border-radius: 15px;
    padding: 4px 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.comment-reaction:hover {
    background: #e0e0e0;
}

.comment-reaction.active {
    background: #667eea;
    color: white;
    border-color: #667eea;
}

.add-reaction-btn {
    background: transparent;
    border: 1px dashed #ccc;
    border-radius: 15px;
    padding: 4px 8px;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-reaction-btn:hover {
    border-color: #667eea;
    color: #667eea;
}

.error-message {
    text-align: center;
    padding: 40px;
    color: #666;
}

.error-message h2 {
    color: #dc3545;
    margin-bottom: 15px;
}

/* Responsive Design for Entry View */
@media (max-width: 768px) {
    .entry-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .entry-meta-details {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .entry-info h1 {
        font-size: 1.8rem;
    }
    
    .comment-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal.show {
    display: flex;
}

.modal-content {
    background: var(--bg-primary);
    color: var(--text-primary);
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

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

.modal-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
    margin-top: 20px;
}

.modal-buttons .btn {
    flex: 1;
    max-width: 150px;
}

.close {
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
}

.close:hover {
    color: #000;
}

/* Version footer styling */
.version-footer {
    position: fixed;
    bottom: 10px;
    right: 10px;
    color: #999;
    font-size: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
}

/* Subtitle text styling */
.subtitle-text {
    margin-top: 20px;
    color: #666;
    font-size: 14px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
}

/* Password help text */
.password-help {
    color: #666;
    font-size: 12px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
}

/* Editor page specific styles */
.editor-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    padding: 12px 8px;
}

@media (min-width: 768px) {
    .editor-page-header {
        margin-bottom: 20px;
        padding: 0;
    }
}

.editor-container-full {
    max-width: 800px;
    margin: 0 auto;
    padding: 0;
    background: transparent;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    box-sizing: border-box;
    border: none;
    outline: none;
    box-shadow: none;
}

@media (min-width: 768px) {
    .editor-container-full {
        padding: 20px;
    }
}

.editor-header-section {
    display: none !important;
    padding: 0 8px;
    padding-bottom: 0;
    margin-bottom: 15px;
    flex-shrink: 0;
}

#editorModeElements {
    display: none !important;
}

@media (min-width: 768px) {
    .editor-header-section {
        padding: 20px;
        padding-bottom: 0;
    }
}

.editor-header-section h2 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

.title-input-field {
    width: 100%;
    padding: 15px 15px;
    border-left: 3px solid #4CAF50;
    border-right: 3px solid #4CAF50;
    border-top: none;
    border-bottom: none;
    border-radius: 0;
    margin: 0;
    font-size: 24px;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    background: transparent;
    color: var(--text-primary);
    transition: none;
    outline: none;
    cursor: pointer;
    resize: none;
    overflow: hidden;
    overflow-y: hidden;
    min-height: 40px;
    max-height: none;
    line-height: 1.3;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: break-word;
    box-sizing: border-box;
    order: 2;
}

/* Orange border when shared */
body.shared .title-input-field {
    border-left-color: #FF9800;
    border-right-color: #FF9800;
}

.title-input-field:focus {
    cursor: text;
    outline: none;
}

.title-input-field:hover:not(:focus) {
    background: rgba(var(--text-primary), 0.05);
}

.editor-controls-section {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.save-buttons-group {
    display: flex;
    gap: 10px;
}

.editor-footer-section {
    display: none;
    padding: 20px;
    padding-top: 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-top: 1px solid var(--border-color);
    background: var(--bg-primary);
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    max-width: 800px;
    margin: 0 auto;
    z-index: 100;
}

.word-count-display {
    display: flex;
    gap: 15px;
    font-size: 14px;
    color: var(--text-secondary);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 300;
}

.back-button-section {
    margin-bottom: 20px;
}

/* Shared pill styles */
.shared-pill {
    background: #ff6b35;
    color: white;
    padding: 4px 12px;
    border: none;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-family: 'Space Grotesk', sans-serif;
}

/* Back button arrow styling - thicker 2px arrow */
.btn-back {
    font-weight: bold;
}

.btn-back::before {
    content: '\2190';
    margin-right: 8px;
    font-weight: 900;
    font-size: 18px;
    line-height: 1;
}

/* Save Draft button styling */
.btn-save-draft {
    background: #28a745;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.btn-save-draft:hover {
    background: #218838;
}

/* Shared status message styling (appears above editor when shared) */
.shared-status {
    background: #FF6B35;
    color: white;
    padding: 12px 8px;
    border-radius: 0;
    margin: 0 8px 10px 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: none;
    width: calc(100% - 16px);
}

@media (min-width: 768px) {
    .shared-status {
        padding: 14px 8px;
        font-size: 12px;
        border-radius: 8px;
        margin: 0 20px 15px 20px;
        width: calc(100% - 40px);
    }
}

/* Ensure all text in shared status is white */
.shared-status span {
    color: white !important;
    font-size: 14px;
    font-weight: 600;
}

/* Draft status message styling (appears above editor) */
.draft-status {
    background: #28a745;
    color: white;
    padding: 12px 8px;
    border-radius: 0;
    margin: 0 8px 10px 8px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    justify-content: center;
    width: calc(100% - 16px);
}

/* Editing previously shared entry - yellow warning banner */
.draft-status.editing-shared {
    background: #FFBF00;
    color: white;
}

@media (min-width: 768px) {
    .draft-status {
        padding: 14px 8px;
        font-size: 12px;
        border-radius: 8px;
        margin: 0 20px 10px 20px;
        width: calc(100% - 40px);
    }
}

/* Ensure all text in draft status is white */
.draft-status span {
    color: white !important;
    font-size: 14px;
    font-weight: 600;
}

/* Draft status INSIDE editor - positioned at TOP (above toolbar) */
.draft-status-inside {
    position: relative;
    background: #28a745;
    color: white;
    padding: 12px 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px 8px 0 0;
    border: 3px solid #4CAF50;
    border-bottom: none;
    order: 0;
    min-height: 40px;
    flex-wrap: wrap;
}

.draft-status-inside.editing-shared {
    background: #FFBF00;
    color: white;
}

@media (min-width: 768px) {
    .draft-status-inside {
        padding: 14px 8px;
        font-size: 12px;
    }
}

.draft-status-inside span {
    color: white !important;
    font-size: 14px;
    font-weight: 600;
}

#saveText, #viewSaveText {
    color: white !important;
    margin-left: 4px;
    display: inline !important;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Shared status INSIDE editor - positioned at TOP (above toolbar) */
.shared-status-inside {
    position: relative;
    background: #FF6B35;
    color: white;
    padding: 12px 15px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    box-sizing: border-box;
    border-radius: 8px 8px 0 0;
    border: 3px solid #FF9800;
    border-bottom: none;
    order: 0;
    min-height: 40px;
    flex-wrap: wrap;
}

@media (min-width: 768px) {
    .shared-status-inside {
        padding: 14px 8px;
        font-size: 12px;
    }
}

.shared-status-inside span {
    color: white !important;
    font-size: 14px;
    font-weight: 600;
}

/* Save indicator circle styling */
.save-indicator {
    margin-right: 4px;
    font-size: 16px;
    color: white !important;
    transition: opacity 0.3s ease;
}

/* Flashing animation when saving - flash 2 times */
.save-indicator.saving {
    animation: flash-three-times 1.6s ease-in-out 1;
}

/* Solid state when saved */
.save-indicator.saved {
    opacity: 1;
    animation: none;
}

/* Share indicator circle styling (orange dot for shared entries) */
.share-indicator {
    margin-right: 4px;
    font-size: 16px;
    color: white !important;
    opacity: 1;
}

@keyframes flash-three-times {
    /* two pulses with clear gaps */
    0%   { opacity: 1; }
    15%  { opacity: 0.2; }
    30%  { opacity: 1; }
    65%  { opacity: 0.2; }
    80%  { opacity: 1; }
    100% { opacity: 1; }
}

.shared-pill-close {
    background: none;
    border: none;
    color: white;
    font-size: 16px;
    cursor: pointer;
    padding: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shared-pill-close:hover {
    background: rgba(255,255,255,0.2);
}

/* ========================================
   EDIT MODE STYLES - Quill Editor
   ======================================== */

/* Make editor wrapper flexbox for element ordering */
#editorWrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 0;
    padding: 0;
}

/* Scope Quill editor styles to edit mode only */
#editorModeElements .ql-editor {
    border: 3px solid #4CAF50;
    border-top: none;
    border-radius: 0 0 8px 8px;
    padding: 20px 8px;
    margin: 0;
    background: transparent;
    color: var(--text-primary);
    min-height: 400px;
    font-size: 16px;
    line-height: 1.6;
    transition: border-color 0.3s ease;
    order: 3;
}

@media (min-width: 768px) {
    #editorModeElements .ql-editor {
        padding: 20px;
        margin: 0;
    }
}

/* Orange border when entry is shared - edit mode only */
body.shared #editorModeElements .ql-editor {
    border-color: #FF9800;
}

/* Floating Share Button */
.floating-share-container {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    display: flex;
    justify-content: center;
}

.floating-share-container .btn-share {
    max-width: 200px;
    min-width: 120px;
    box-shadow: none;
}

.floating-share-container .btn-share:hover {
    box-shadow: none;
}

/* Journey Dots Timeline */
.journey-dots-container {
    width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    margin-bottom: 20px;
    padding: 35px 0 10px 0;
}

/* Mobile: Remove edge padding for circles */
@media (max-width: 768px) {
    .journey-dots-container {
        width: calc(100% + 16px);
        margin-left: -8px;
        margin-right: -8px;
    }
}

.journey-dots-scroll {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 calc(50vw - 12px) 0 calc(50vw - 12px);
    min-width: min-content;
}

.journey-dot {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #0006ff;
    cursor: pointer;
    flex-shrink: 0;
    position: relative;
    transition: background 0.3s ease;
    -webkit-tap-highlight-color: transparent;
    -webkit-touch-callout: none;
    -webkit-user-select: none;
    user-select: none;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Status indicator dot for author viewing own entries */
.journey-dot::before {
    content: '';
    border-radius: 50%;
    position: absolute;
    display: none;
}

/* Draft entries: actual 12px green circles (no container) */
.journey-dot.draft {
    background: #28a745 !important;
    width: 12px;
    height: 12px;
}

.journey-dot.draft::before {
    display: none;
}

/* Draft entries: white background with green center when selected */
.journey-dot.draft.selected {
    background: #ffffff !important;
    width: 24px;
    height: 24px;
    position: relative;
}

.journey-dot.draft.selected::before {
    display: block !important;
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #28a745 !important;
    border-radius: 50%;
}

/* Shared entries: actual 24px orange circles */
.journey-dot.shared {
    background: #FF6B35 !important;
    width: 24px;
    height: 24px;
}

.journey-dot.shared::before {
    display: none;
}

/* Shared entries: white background with orange center when selected */
.journey-dot.shared.selected {
    background: #ffffff !important;
    width: 24px;
    height: 24px;
    position: relative;
}

.journey-dot.shared.selected::before {
    display: block !important;
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 12px;
    height: 12px;
    background: #FF6B35 !important;
    border-radius: 50%;
}

/* Today's dot is always 32px white in dark mode, dark gray in light mode */
.journey-dot.today {
    width: 32px !important;
    height: 32px !important;
    background: #ffffff !important;
    position: relative;
}

/* In light mode, today's dot should be dark gray for visibility */
[data-theme="light"] .journey-dot.today {
    background: #4a4a4a !important;
}

/* Today with draft entry: 24px green center */
.journey-dot.today.draft {
    background: #ffffff !important;
}

[data-theme="light"] .journey-dot.today.draft {
    background: #4a4a4a !important;
}

.journey-dot.today.draft::before {
    display: block !important;
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: #28a745 !important;
    border-radius: 50%;
}

/* Today with shared entry: 24px orange center */
.journey-dot.today.shared {
    background: #ffffff !important;
}

[data-theme="light"] .journey-dot.today.shared {
    background: #4a4a4a !important;
}

.journey-dot.today.shared::before {
    display: block !important;
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 24px;
    height: 24px;
    background: #FF6B35 !important;
    border-radius: 50%;
}

.journey-dot.selected {
    background: var(--text-primary);
}

.journey-dot::after {
    content: attr(data-date);
    position: absolute;
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 10px;
    color: #ffffff;
    white-space: nowrap;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.journey-dot:hover::after,
.journey-dot.selected::after,
.journey-dot.always-show-label::after {
    opacity: 1;
}

/* Dark mode adjustments */
[data-theme="dark"] .journey-dot.selected {
    background: #ffffff;
}

/* Hide scrollbar */
.journey-dots-container::-webkit-scrollbar {
    display: none;
}

.journey-dots-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Edit mode: Quill toolbar styling - INSIDE green box, BELOW banner, ABOVE title */
#editorModeElements .ql-toolbar {
    background: transparent;
    border-left: 3px solid #4CAF50;
    border-right: 3px solid #4CAF50;
    border-top: none;
    border-bottom: none;
    border-radius: 0;
    padding: 10px 15px;
    margin: 0;
    order: 1;
}

/* Orange border when shared */
body.shared #editorModeElements .ql-toolbar {
    border-left-color: #FF9800;
    border-right-color: #FF9800;
}

/* Remove default grouping spacing and add uniform 4px gap between all buttons */
#editorModeElements .ql-toolbar .ql-formats {
    margin-right: 0 !important;
}

#editorModeElements .ql-toolbar button,
#editorModeElements .ql-toolbar .ql-picker {
    margin-right: 4px !important;
}

/* Remove extra margin from last button */
#editorModeElements .ql-toolbar button:last-child,
#editorModeElements .ql-toolbar .ql-picker:last-child {
    margin-right: 0 !important;
}

/* View mode: Hide any toolbar that might appear */
.view-container .ql-toolbar {
    display: none;
}

/* Hide the editor mode draft/shared status in view mode */
.view-container #draftStatus,
.view-container #sharedStatus {
    display: none;
}

#editorModeElements .ql-toolbar .ql-stroke {
    stroke: var(--text-primary);
}

#editorModeElements .ql-toolbar .ql-fill {
    fill: var(--text-primary);
}

#editorModeElements .ql-toolbar .ql-picker-label {
    color: var(--text-primary);
}

#editorModeElements .ql-toolbar button:hover {
    background: var(--bg-secondary);
}

/* Fix Quill editor text transition speed - edit mode only */
#editorModeElements .ql-editor,
#editorModeElements .ql-editor p,
#editorModeElements .ql-editor *,
#editorModeElements .ql-editor div,
#editorModeElements .ql-editor span,
#editorModeElements .ql-editor [class*="ql-"] {
    transition: color 1s ease;
    transition-delay: 0s;
}

/* Remove any inherited transitions that might be stacking - edit mode */
#editorModeElements .ql-editor * {
    transition-property: color;
    transition-duration: 1s;
    transition-timing-function: ease;
    transition-delay: 0s;
}

/* Draft status styling */
.draft-status-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.draft-status-section .status-text {
    font-weight: 500;
    color: var(--text-primary);
}

.draft-status-section .status-time {
    font-size: 12px;
    color: var(--text-muted);
}

/* Override hardcoded inline text colors to respect theme - edit mode */
#editorModeElements .ql-editor span[style*="color"],
#editorModeElements .ql-editor p[style*="color"],
#editorModeElements .ql-editor div[style*="color"] {
    color: var(--text-primary);
}

/* Ensure all Quill editor content respects theme colors - edit mode */
#editorModeElements .ql-editor * {
    color: var(--text-primary);
}

/* Ensure bold and italic formatting works in editor mode */
#editorModeElements .ql-editor strong,
#editorModeElements .ql-editor b {
    font-weight: 700 !important;
}

#editorModeElements .ql-editor em,
#editorModeElements .ql-editor i {
    font-style: italic !important;
}

/* View mode: Override any inline colors */
.view-container .view-content span[style*="color"],
.view-container .view-content p[style*="color"],
.view-container .view-content div[style*="color"] {
    color: var(--text-primary);
}

/* Edit mode: Quill container styling */
#editorModeElements .ql-container {
    background: transparent;
    border: none;
    flex: 1;
    order: 3;
    display: flex;
    flex-direction: column;
    height: 100%;
    box-sizing: border-box;
    border-radius: 0 0 8px 8px;
    margin: 0;
    padding: 0;
}

#editorModeElements .ql-editor.ql-blank::before {
    color: var(--text-secondary);
}

/* Orange border when shared - edit mode only */
body.shared #editorModeElements .ql-editor {
    border-color: #FF9800;
}

/* Text color rules for dark/light modes */
[data-theme="dark"] body,
[data-theme="dark"] #editorModeElements .ql-editor,
[data-theme="dark"] .editor-header h2,
[data-theme="dark"] .title-input,
[data-theme="dark"] .view-container .view-header h1,
[data-theme="dark"] .view-container .view-content {
    color: #fff;
}

[data-theme="light"] body,
[data-theme="light"] #editorModeElements .ql-editor,
[data-theme="light"] .editor-header h2,
[data-theme="light"] .title-input,
[data-theme="light"] .view-container .view-header h1,
[data-theme="light"] .view-container .view-content {
    color: #000;
}

/* Make editor div stretch to fill available space */
#editor {
    flex: 1;
    display: flex;
    flex-direction: column;
    padding-top: 42px;
}

@media (min-width: 768px) {
    #editor {
        padding-top: 48px;
    }
}

/* ========================================
   VIEW MODE STYLES - Isolated & Clean
   ======================================== */

.view-container {
    padding: 0 8px;
    max-width: 1024px;
    width: 100%;
    margin: 0 auto;
    text-align: left;
    box-sizing: border-box;
}

@media (min-width: 768px) {
    .view-container {
        padding: 20px;
    }
}

@media (min-width: 1025px) {
    .view-container {
        width: 1024px;
    }
}

/* View mode: Shared status banner */
.view-container #viewSharedStatus {
    margin: 0 0 20px 0;
    width: 100%;
}

/* View mode: Header section */
.view-container .view-header {
    margin-bottom: 20px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
    width: 100%;
    text-align: left;
}

@media (min-width: 768px) {
    .view-container .view-header {
        margin-bottom: 30px;
        padding-bottom: 20px;
    }
}

.view-container .view-header h1 {
    margin: 0 0 15px 0;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
    text-align: left;
    width: 100%;
}

.view-container .view-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 10px;
}

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

/* Hide shared pill in view mode (we have banner instead) */
.view-container .view-actions .shared-pill {
    display: none;
}

/* View mode: Content area */
.view-container .view-content {
    padding: 0;
    background: transparent;
    border: none;
    outline: none;
    font-size: 16px;
    line-height: 1.6;
    min-height: calc(100vh - 240px);
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
}

/* View mode: Block elements - proper specificity, no !important */
.view-container .view-content p,
.view-container .view-content div,
.view-container .view-content h1,
.view-container .view-content h2,
.view-container .view-content h3,
.view-container .view-content ul,
.view-container .view-content ol,
.view-container .view-content blockquote {
    max-width: none;
    width: 100%;
    box-sizing: border-box;
    text-align: left;
    margin-left: 0;
    margin-right: 0;
}

/* View mode: Ensure bold and italic formatting works */
.view-container .view-content strong,
.view-container .view-content b {
    font-weight: 700 !important;
}

.view-container .view-content em,
.view-container .view-content i {
    font-style: italic !important;
}

/* View mode: Strip any Quill editor styling */
.view-container .view-content .ql-editor {
    padding: 0;
    border: none;
    outline: none;
    width: 100%;
    max-width: 100%;
}

/* Hide any Quill UI elements in view mode */
.view-container .ql-toolbar,
.view-container .ql-formats,
.view-container .ql-picker {
    display: none;
}

.view-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 15px;
    border: none;
    outline: none;
    box-shadow: none;
}

/* Remove old editor-container styles - no longer needed */
.ql-container {
    flex: 1;
    display: flex;
    flex-direction: column;
    background: transparent !important;
    border: none !important;
}

/* ========================================
   I APPRECIATE PAGE STYLES (SEPARATE MODULE)
   ======================================== */

.appreciate-container {
    max-width: 1024px;
    margin: 0 auto;
    padding: 20px;
    padding-bottom: 100px;
    min-height: 100vh;
    width: 100%;
    box-sizing: border-box;
    position: relative;
}

.appreciate-container::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, transparent, var(--bg-gradient));
    pointer-events: none;
    z-index: 10;
}

.appreciate-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
}

.appreciate-input-section {
    margin-bottom: 60px;
    margin-top: 50px;
    text-align: center;
}

.appreciate-prompt-wrapper {
    margin-bottom: 30px;
}

.appreciate-text-flow {
    display: block;
    text-align: left;
    max-width: 900px;
    margin: 0 auto;
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.2;
}

.appreciate-prefix-text {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.2;
    display: inline;
    vertical-align: baseline;
}

.appreciate-text-input {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    background: transparent;
    border: none;
    outline: none;
    padding: 0;
    margin: 0;
    font-family: 'Space Grotesk', sans-serif;
    resize: none;
    overflow: hidden;
    line-height: 1.2;
    min-height: 58px;
    width: 100%;
    display: block;
    margin-top: -58px; /* Pull up to align with "I appreciate" */
    padding-left: 0;
    text-indent: 280px; /* Push first line to start after "I appreciate" with natural spacing */
}

.appreciate-text-input:focus {
    outline: none;
    border: none;
}

.appreciate-text-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.5;
}

.appreciate-submit-btn {
    font-size: 16px;
    padding: 12px 24px;
    background: #FF9800;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.3s, opacity 0.5s ease, transform 0.5s ease;
    width: auto;
    display: inline-block;
    opacity: 0;
    transform: translateY(10px);
    pointer-events: none;
}

.appreciate-submit-btn-visible {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.appreciate-submit-btn:hover {
    background: #F57C00;
}

.appreciate-submit-btn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.appreciate-list-section {
    margin-top: 40px;
}

.appreciate-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.appreciate-item {
    background: transparent;
    border: none;
    border-radius: 0;
    padding: 20px 0;
    transition: none;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    opacity: 1;
}

.appreciate-item-new {
    animation: fadeInSlide 0.8s ease-out;
}

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

.appreciate-item-own {
    align-items: flex-end;
}

.appreciate-item:hover {
    transform: none;
    box-shadow: none;
}

.appreciate-item-header {
    margin-bottom: 6px;
}

.appreciate-timestamp {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 400;
}

.appreciate-item-content {
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    font-weight: 400;
    max-width: 66.666%;
    text-align: left;
}

.appreciate-item-own .appreciate-item-content {
    text-align: right;
}

.appreciate-empty {
    text-align: center;
    color: var(--text-secondary);
    font-size: 16px;
    padding: 40px 20px;
}

/* Responsive design for appreciate page */

/* Desktop: 1024px and above - max width container */
@media (min-width: 1025px) {
    .appreciate-container {
        max-width: 1024px;
    }
}

/* Tablet landscape: 768px to 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .appreciate-container {
        width: 100%;
        padding: 20px 40px;
    }
}

/* Tablet portrait: 481px to 768px */
@media (max-width: 768px) {
    .appreciate-container {
        width: 100%;
        padding: 20px;
    }
    
    .appreciate-input-section {
        margin-top: 80px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 40vh;
    }
    
    .appreciate-text-flow {
        font-size: 32px;
    }
    
    .appreciate-prefix-text {
        font-size: 32px;
    }
    
    .appreciate-text-input {
        font-size: 32px;
        text-indent: 190px;
        margin-top: -38px;
    }
}

/* Mobile: 480px and below */
@media (max-width: 480px) {
    .appreciate-container {
        width: 100%;
        padding: 15px;
    }
    
    .appreciate-input-section {
        margin-top: 60px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        min-height: 40vh;
    }
    
    .appreciate-text-flow {
        font-size: 24px;
    }
    
    .appreciate-prefix-text {
        font-size: 24px;
    }
    
    .appreciate-text-input {
        font-size: 24px;
        text-indent: 143px;
        margin-top: -29px;
    }
}

/* ======================================== */

/* Dashboard page responsive breakpoints */

/* Desktop: 1024px and above - max width container */
@media (min-width: 1025px) {
    .dashboard-container {
        max-width: 1024px;
    }
}

/* Tablet landscape: 768px to 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .dashboard-container {
        width: 100%;
        padding: 20px 40px;
    }
}

/* Tablet portrait and mobile */
@media (max-width: 768px) {
    .dashboard-container {
        width: 100%;
        padding: 20px 20px 0 20px;
    }
    
    .dashboard-header {
        padding-left: 20px;
        padding-right: 20px;
    }
}

@media (max-width: 480px) {
    .dashboard-container {
        width: 100%;
        padding: 15px 15px 0 15px;
    }
    
    .dashboard-header {
        padding-left: 15px;
        padding-right: 15px;
    }
}

/* Admin page responsive breakpoints */

/* Desktop: 1024px and above - max width container */
@media (min-width: 1025px) {
    .admin-container {
        max-width: 1024px;
    }
}

/* Tablet landscape: 768px to 1024px */
@media (min-width: 769px) and (max-width: 1024px) {
    .admin-container {
        width: 100%;
        padding: 20px 40px;
    }
}

/* Tablet portrait: 481px to 768px */
@media (max-width: 768px) {
    .container {
        margin: 20px;
        padding: 30px 20px;
    }
    
    .admin-container {
        width: 100%;
        padding: 20px;
    }
}

/* Mobile: 480px and below */
@media (max-width: 480px) {
    .admin-container {
        width: 100%;
        padding: 15px;
    }
    
    .admin-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .table {
        font-size: 14px;
    }
}

/* Timer Page Styles */
.timer-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    flex: 1;
    padding: 0;
    overflow: hidden;
    position: relative;
    width: 100%;
}

.timer-duration-buttons {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    max-width: 400px;
    margin-top: 20px;
    margin-bottom: 40px;
    opacity: 1;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.timer-duration-buttons.hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.timer-duration-btn {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.15);
    color: rgba(255, 255, 255, 0.525);
    border-radius: 25px;
    padding: 12px 24px;
    font-size: 1rem;
    font-weight: 400;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    transition: all 0.4s ease;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
}

.timer-duration-btn:hover {
    transform: scale(1.05);
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.2);
}

.timer-duration-btn.selected {
    background: rgba(255, 107, 53, 0.2);
    border: 1px solid rgba(255, 107, 53, 0.4);
    box-shadow: 0 4px 16px 0 rgba(255, 107, 53, 0.2);
    color: #FF6B35;
    font-weight: 600;
    transition: all 0.05s ease;
}

/* Light mode timer buttons */
[data-theme="light"] .timer-duration-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 4px 16px 0 rgba(0, 0, 0, 0.1);
    color: rgba(0, 0, 0, 0.6);
}

[data-theme="light"] .timer-duration-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.15);
    box-shadow: 0 6px 20px 0 rgba(0, 0, 0, 0.15);
}

[data-theme="light"] .timer-duration-btn.selected {
    background: rgba(255, 107, 53, 0.15);
    border: 1px solid rgba(255, 107, 53, 0.3);
    box-shadow: 0 4px 16px 0 rgba(255, 107, 53, 0.15);
    color: #FF6B35;
}

.timer-circles-wrapper {
    position: relative;
    width: 280px;
    height: 280px;
    margin: 0 auto 50px;
    padding: 40px;
    overflow: visible;
}

.timer-circles-wrapper > * {
    position: absolute !important;
    top: 40px !important;
    left: 40px !important;
    margin: 0 !important;
}

.timer-circles-wrapper > .timer-circle-container {
    pointer-events: none !important;
    z-index: 100;
}

.timer-circle-container {
    position: absolute;
    display: flex;
    align-items: center;
    justify-content: center;
    top: 0;
    left: 0;
    border-radius: 50%;
    width: 200px;
    height: 200px;
    z-index: 10;
    pointer-events: none;
    overflow: visible !important;
}

.hold-progress-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 3;
    transition: opacity 0.2s ease;
}

.hold-progress-circle {
    transition: stroke-dashoffset 0.016s linear;
    filter: drop-shadow(0 0 8px rgba(255, 107, 53, 0.8));
}

.timer-progress-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-90deg);
    pointer-events: none;
    z-index: 1;
}

.timer-progress-ring-circle {
    transition: stroke-dashoffset 0.016s linear, opacity 0.3s ease;
}

.timer-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: transparent;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer !important;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s ease, opacity 0.2s ease;
    position: relative;
    z-index: 9999 !important;
    pointer-events: auto !important;
}

.timer-circle:hover {
    transform: none;
}

.timer-circle.active {
    cursor: default !important;
}

.timer-circle.active:hover {
    transform: none;
}

.timer-circle:active {
    transform: scale(0.98);
}

.timer-display {
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    text-align: center;
    pointer-events: none;
}

.timer-display .timer-text {
    animation: fadeInHold 1s ease-in forwards;
    animation-delay: 3s;
    opacity: 0;
}

@keyframes fadeInHold {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.timer-text {
    font-size: 1.5rem;
    font-weight: 600;
}

.timer-time {
    font-size: 2.5rem;
    font-weight: 700;
    font-feature-settings: 'tnum';
    color: white;
    display: inline;
    margin-right: 12px;
}

.timer-mmss {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.7;
    display: inline;
}

.timer-status {
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-align: center;
    max-width: 500px;
}

/* NEW TEST CIRCLE SECTION - Completely separate from timer */
.new-circle-section {
    width: 100%;
    padding: 80px 0;
    background: transparent;
    display: block;
}

.new-timer-circle-test {
    width: 200px;
    height: 200px;
    margin: 30px auto 0;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: visible;
}

.new-progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.2s ease;
    opacity: 0;
}

.new-progress-circle {
    transition: stroke-dashoffset 0.016s linear;
    stroke: white;
}

/* Light mode: progress circle should be dark gray/logo color */
[data-theme="light"] .new-progress-circle {
    stroke: #2a2a2a;
}

.new-circle-inner {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: #FF6B35;
    border: none;
    overflow: visible;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    -webkit-tap-highlight-color: transparent;
    box-sizing: border-box;
}

.new-circle-inner:active {
    transform: scale(0.98);
}

.new-circle-inner.timer-active {
    pointer-events: none;
    cursor: default;
}

.new-timer-display {
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    text-align: center;
    pointer-events: none;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.new-timer-display .timer-text {
    animation: fadeInHold 1s ease-in forwards;
    animation-delay: 3s;
    opacity: 0;
    font-size: 1.5rem;
    font-weight: 600;
}

@keyframes fadeInHold {
    to {
        opacity: 1;
    }
}

.new-timer-display .timer-time {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    line-height: 1;
    text-align: center;
    display: block;
    margin: 0;
    padding: 0;
}

.new-timer-display .timer-mmss {
    font-size: 1rem;
    font-weight: 500;
    opacity: 0.7;
    display: block;
    color: white;
    text-align: center;
    margin: 4px 0 0 0;
    padding: 0;
}

.prism-demo-container {
    position: absolute;
    width: 200px;
    height: 200px;
    top: 0;
    left: 0;
    border-radius: 50%;
    z-index: 0;
    pointer-events: none;
    overflow: visible !important;
}

.prism-demo-circle {
    width: 200px;
    height: 200px;
    border-radius: 50%;
    overflow: hidden;
    position: relative;
}

.prism-demo-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    pointer-events: none;
}

/* Golden Electric Border */
.electric-border-gold {
  --electric-border-color: #FFD700;
  --electric-light-color: #FFC107;
  --eb-border-width: 4px;
  position: relative;
  border-radius: 50% !important;
  overflow: visible;
  isolation: isolate;
}

.electric-border-gold .eb-stroke {
  border: var(--eb-border-width) solid var(--electric-border-color);
}

.electric-border-gold .eb-glow-1 {
  border: var(--eb-border-width) solid rgba(255, 215, 0, 0.6);
  opacity: 0.5;
  filter: blur(calc(0.5px + (var(--eb-border-width) * 0.25)));
}

.electric-border-gold .eb-glow-2 {
  border: var(--eb-border-width) solid var(--electric-light-color);
  opacity: 0.5;
  filter: blur(calc(2px + (var(--eb-border-width) * 0.5)));
}

.electric-border-gold .eb-background-glow {
  z-index: -1;
  transform: scale(1.08);
  filter: blur(32px);
  opacity: 0.3;
  background: linear-gradient(-30deg, var(--electric-light-color), transparent, var(--electric-border-color));
}

/* ==================== Electric Border Effect ==================== */
.electric-border {
  --electric-border-color: #FF6B35;
  --electric-light-color: #FF6B35;
  --eb-border-width: 4px;
  position: relative;
  border-radius: 50% !important;
  overflow: visible;
  isolation: isolate;
}

.eb-svg {
  position: fixed;
  left: -10000px;
  top: -10000px;
  width: 10px;
  height: 10px;
  opacity: 0.001;
  pointer-events: none;
}

.eb-content {
  position: relative;
  border-radius: 50%;
  z-index: 1;
  overflow: visible !important;
  pointer-events: none;
}

.eb-layers {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  pointer-events: none !important;
  z-index: 2;
  opacity: 1;
  transition: opacity 0.2s ease;
}

.eb-stroke,
.eb-glow-1,
.eb-glow-2,
.eb-background-glow {
  position: absolute;
  inset: 0;
  border-radius: 50% !important;
  pointer-events: none !important;
  box-sizing: border-box;
}

.eb-stroke {
  border: var(--eb-border-width) solid var(--electric-border-color);
}

.eb-glow-1 {
  border: var(--eb-border-width) solid rgba(255, 107, 53, 0.6);
  opacity: 0.5;
  filter: blur(calc(0.5px + (var(--eb-border-width) * 0.25)));
}

.eb-glow-2 {
  border: var(--eb-border-width) solid var(--electric-light-color);
  opacity: 0.5;
  filter: blur(calc(2px + (var(--eb-border-width) * 0.5)));
}

.eb-background-glow {
  z-index: -1;
  transform: scale(1.08);
  filter: blur(32px);
  opacity: 0.3;
  background: linear-gradient(-30deg, var(--electric-light-color), transparent, var(--electric-border-color));
}

/* Mobile adjustments for timer */
@media (max-width: 768px) {
    .timer-duration-buttons {
        max-width: 350px;
        gap: 10px;
    }
    
    .timer-duration-btn {
        padding: 10px 18px;
        font-size: 0.9rem;
    }
    
    .timer-circles-wrapper > * {
        top: 50px !important;
        left: 50px !important;
    }
    
    .prism-demo-container,
    .timer-circle-container {
        width: 180px !important;
        height: 180px !important;
    }
    
    .prism-demo-circle {
        width: 180px !important;
        height: 180px !important;
    }
    
    .timer-circle {
        width: 180px;
        height: 180px;
    }
    
    .timer-progress-ring {
        transform: scale(0.9) translate(-11.1%, -11.1%) rotate(-90deg);
    }
    
    .hold-progress-ring {
        transform: translate(-50%, -50%) scale(0.9);
    }
    
    .timer-text {
        font-size: 1.3rem;
    }
    
    .timer-time {
        font-size: 2rem;
    }
    
    .timer-mmss {
        display: none;
    }
    
    .new-timer-display .timer-time {
        font-size: 2rem;
        display: block;
        margin: 0;
        padding: 0;
    }
    
    .new-timer-display .timer-mmss {
        font-size: 0.85rem;
        display: block;
        text-align: center;
        margin: 2px 0 0 0;
        padding: 0;
    }
}

/* Timer History */
.timer-history {
    margin-top: 78px;
    padding: 0 20px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    opacity: 1;
    transition: opacity 0.5s ease;
    flex: 1;
    display: flex;
    flex-direction: column;
    position: relative;
    overflow-y: auto;
    overflow-x: hidden;
    margin-bottom: 0;
}

.timer-history::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to bottom, transparent, var(--bg-gradient));
    pointer-events: none;
    z-index: 10;
}

.timer-history.hidden {
    opacity: 0;
    pointer-events: none;
}

.timer-history-list {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.timer-history-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    padding: 0px 0;
    background: transparent;
    color: #3C3C3C;
    font-size: 0.95rem;
    font-family: 'Space Grotesk', sans-serif;
    line-height: 1.8;
    animation: fadeInHistory 0.4s ease forwards;
    align-items: center;
}

[data-theme="light"] .timer-history-item {
    color: #CECECE;
}

.timer-history-time {
    text-align: left;
    white-space: nowrap;
}

.timer-history-duration {
    text-align: right;
    white-space: nowrap;
    min-width: 60px;
}

.timer-history-item:nth-child(2) {
    opacity: 0.85;
}

.timer-history-item:nth-child(3) {
    opacity: 0.7;
}

.timer-history-item:nth-child(4) {
    opacity: 0.55;
}

.timer-history-item:nth-child(5) {
    opacity: 0.4;
}

.timer-history-item:nth-child(n+6) {
    opacity: 0.25;
}

@keyframes fadeInHistory {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@media (max-width: 768px) {
    .timer-history {
        margin-top: 64px;
        padding: 0 16px;
    }
    
    .timer-history-item {
        padding: 0px 0;
        font-size: 0.9rem;
    }
}

/* Navbar Timer Display */

.navbar-timer {
    background: linear-gradient(135deg, #FFB347 0%, #FF6B35 100%);
    border-radius: 20px;
    width: 66px;
    min-width: 66px;
    height: 39px;
    padding: 0;
    font-family: 'Space Grotesk', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: white;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(255, 107, 53, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    order: 0;
    font-feature-settings: 'tnum';
}

.navbar-timer:not(.completed) {
    cursor: default;
    pointer-events: none;
}

.navbar-timer span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.navbar-timer.completed {
    background: linear-gradient(135deg, #FFB347 0%, #FF6B35 100%);
    cursor: pointer;
    width: auto;
    min-width: 0;
    padding: 8px 16px;
}

.navbar-timer.completed:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(255, 107, 53, 0.4);
}

/* Timer Circle Wrapper */
.timer-circle-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
}

/* Timer Cancel Button */
.timer-cancel-btn {
    display: flex;
    justify-content: center;
    cursor: pointer;
    user-select: none;
}

.timer-cancel-btn svg {
    width: 40px;
    height: 40px;
}

.cancel-progress-ring {
    stroke-dasharray: 113.1;
    stroke-dashoffset: 113.1;
    transition: stroke-dashoffset 0.016s linear;
}

/* Torch Page Styling */
.torch-page {
    display: flex;
    flex-direction: column;
}

.torch-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding: 40px 20px;
    text-align: center;
}

.torch-header {
    margin-bottom: 40px;
}

.torch-header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
}

.torch-subtitle {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0 0 15px 0;
}

.torch-bodycopy {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin: 0;
    max-width: 500px;
    line-height: 1.5;
    opacity: 0.85;
}

/* Centered Notification Page Layout */
.notification-centered-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: var(--bg-page);
}

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

/* Torch Notification Page */
.torch-duration-pills {
    display: flex;
    gap: 12px;
    margin-bottom: 40px;
    justify-content: center;
    flex-wrap: wrap;
}

.torch-duration-pill {
    padding: 10px 20px;
    border: 1px solid rgba(0, 6, 255, 0.3);
    background: rgba(0, 6, 255, 0.1);
    color: var(--text-primary);
    border-radius: 20px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.05s ease;
}

.torch-duration-pill:hover {
    background: rgba(0, 6, 255, 0.15);
    border-color: rgba(0, 6, 255, 0.4);
}

.torch-duration-pill.active {
    background: rgba(0, 6, 255, 0.3);
    border-color: rgba(0, 6, 255, 0.6);
    color: #0006ff;
}

/* Torch Circle */
.torch-circle-wrapper {
    display: flex;
    justify-content: center;
    margin-bottom: 40px;
}

.torch-circle-container {
    position: relative;
    width: 200px;
    height: 200px;
}

.torch-progress-ring {
    position: absolute;
    top: 0;
    left: 0;
    opacity: 0;
    transition: opacity 0.2s ease;
    z-index: 10;
    display: none;
}

.torch-progress-circle {
    stroke-dasharray: 609.4;
    stroke-dashoffset: 609.4;
    transition: stroke-dashoffset 0.016s linear;
}

.torch-circle-inner {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: #0006ff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 15px rgba(0, 6, 255, 0.3);
}

.torch-circle-inner:hover {
    box-shadow: 0 6px 20px rgba(0, 6, 255, 0.4);
    transform: scale(1.05);
}

.torch-display {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.torch-text {
    font-size: 1.2rem;
    font-weight: 600;
    color: white;
    opacity: 0; /* THIS IS THE FIX - Start invisible */
    transition: opacity 0.3s ease;
}

.torch-time {
    font-size: 3rem;
    font-weight: 700;
    color: white;
}

.torch-countdown {
    font-size: 2rem;
    font-weight: 700;
    color: white;
    font-family: 'Courier New', monospace;
}

/* Timer History (re-used for torch) */
.timer-history {
    margin-top: 78px;
    padding: 0 20px;
    max-width: 600px;
    width: 100%;
    position: relative;
    transition: opacity 0.3s ease;
}

.timer-history::after {
    content: '';
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 80px;
    background: linear-gradient(to top, var(--bg-gradient) 20%, transparent 100%);
    pointer-events: none;
    z-index: 10;
}

.timer-history.hidden {
    opacity: 0;
    pointer-events: none;
}

.timer-history-list {
    display: flex;
    flex-direction: column;
    gap: 0px;
}

.timer-history-item {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 16px;
    padding: 8px 0;
    font-size: 1rem;
    color: var(--text-secondary);
    font-weight: 500;
    border-bottom: 1px solid var(--border-color-fade);
    align-items: center;
}

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

.timer-history-time {
    text-align: left;
    white-space: normal;
}

.timer-history-duration {
    text-align: right;
    white-space: nowrap;
    min-width: 60px;
}

.timer-history-item:nth-child(1) {
    opacity: 1;
}
.timer-history-item:nth-child(2) {
    opacity: 0.85;
}
.timer-history-item:nth-child(3) {
    opacity: 0.7;
}
.timer-history-item:nth-child(4) {
    opacity: 0.55;
}
.timer-history-item:nth-child(5) {
    opacity: 0.4;
}
.timer-history-item:nth-child(n+6) {
    opacity: 0.25;
}

/* Torch Active Banner */
.torch-active-banner {
    width: 100%;
    max-width: 600px;
    margin-top: 60px;
    padding: 30px;
    background: rgba(0, 6, 255, 0.1);
    border: 1px solid rgba(0, 6, 255, 0.3);
    border-radius: 12px;
    text-align: center;
    animation: fadeIn 0.3s ease-in;
}

.torch-banner-content {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.torch-banner-text {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.torch-banner-countdown {
    font-size: 1rem;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.9;
}

/* Torch Share Section */
.torch-share-section {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid rgba(0, 6, 255, 0.2);
}

.torch-share-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 12px 0;
}

.torch-share-link-container {
    display: flex;
    gap: 8px;
    align-items: center;
}

.torch-share-link-input {
    flex: 1;
    padding: 10px 12px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 6, 255, 0.2);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 0.85rem;
    font-family: 'Monaco', 'Courier New', monospace;
    word-break: break-all;
}

.torch-copy-button {
    padding: 10px 16px;
    background: rgba(0, 6, 255, 0.2);
    border: 1px solid rgba(0, 6, 255, 0.4);
    border-radius: 6px;
    color: white;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.torch-copy-button:hover {
    background: rgba(0, 6, 255, 0.3);
    border-color: rgba(0, 6, 255, 0.6);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Global Torch Banner (for recipient on all pages) */
.global-torch-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, rgba(0, 6, 255, 0.15) 0%, rgba(0, 6, 255, 0.08) 100%);
    border-bottom: 2px solid rgba(0, 6, 255, 0.3);
    padding: 16px 20px;
    z-index: 1000;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    animation: slideDown 0.3s ease-out;
}

.torch-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px;
    text-align: center;
}

.torch-banner-message {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
}

.torch-banner-timer {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    opacity: 0.85;
}

@keyframes slideDown {
    from {
        transform: translateY(-100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Adjust body padding when banner is present */
body:has(.global-torch-banner) {
    padding-top: 60px;
}

