/* Local fonts (no CDN — bundled in html/fonts/) */
@font-face {
    font-family: 'Poppins';
    src: url('fonts/Poppins-Regular.ttf') format('truetype');
    font-weight: 400;
    font-style: normal;
}
@font-face {
    font-family: 'Poppins';
    src: url('fonts/Poppins-Semibold.ttf') format('truetype');
    font-weight: 600;
    font-style: normal;
}
@font-face {
    font-family: 'Poppins';
    src: url('fonts/Poppins-Bold.ttf') format('truetype');
    font-weight: 700;
    font-style: normal;
}
@font-face {
    font-family: 'Arizonia';
    src: url('fonts/Arizonia.ttf') format('truetype');
    font-weight: normal;
    font-style: normal;
}

/* CSS Variables for Theming */
:root {
    --theme-color: #1A9DF7;
    --bg-color: #ffffff;
    --surface-color: #ffffff;
    --text-color: #000000;
    --text-secondary: rgba(0, 0, 0, 0.6);
    --border-color: rgba(0, 0, 0, 0.1);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    --glass-bg: rgba(255, 255, 255, 0.1);
    --glass-border: rgba(255, 255, 255, 0.2);
}

[data-theme="dark"] {
    --bg-color: #000000;
    --surface-color: #181818;
    --text-color: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.6);
    --border-color: rgba(255, 255, 255, 0.1);
    --shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
}

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

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: background-color 0.3s, color 0.3s;
    overflow-x: hidden;
}

/* Font Family for Arizonia - defined in header styles below */

/* Page Management */
.page {
    display: none;
    min-height: 100vh;
    padding-bottom: 100px;
}

.page.active {
    display: block;
}

/* Auth Page */
#auth-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
    background: var(--bg-color);
    position: relative;
    overflow: hidden;
}

#auth-page::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, color-mix(in srgb, var(--theme-color) 5%, transparent) 0%, transparent 70%);
    animation: pulse 8s ease-in-out infinite;
    pointer-events: none;
}

@keyframes pulse {
    0%, 100% { transform: scale(1) rotate(0deg); opacity: 0.5; }
    50% { transform: scale(1.1) rotate(180deg); opacity: 0.8; }
}

.auth-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.auth-header {
    text-align: center;
    margin-bottom: 48px;
}

.auth-header h1 {
    font-size: 44px;
    font-weight: bold;
    margin-bottom: 12px;
    letter-spacing: -1px;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.auth-header h1:hover {
    transform: scale(1.02);
}

.auth-header p {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 400;
    letter-spacing: 0.3px;
}

.theme-color {
    color: var(--theme-color);
}

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 32px;
    background: rgba(0, 0, 0, 0.03);
    padding: 6px;
    border-radius: 16px;
    position: relative;
}

[data-theme="dark"] .auth-tabs {
    background: rgba(255, 255, 255, 0.05);
}

.auth-tab {
    flex: 1;
    padding: 14px 20px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    border-radius: 12px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.auth-tab::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--surface-color);
    border-radius: 12px;
    opacity: 0;
    transform: scale(0.8);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .auth-tab::before {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.auth-tab:hover {
    color: var(--theme-color);
    transform: translateY(-2px);
}

.auth-tab.active {
    color: var(--theme-color);
}

.auth-tab.active::before {
    opacity: 1;
    transform: scale(1);
}

.auth-form {
    display: none;
    animation: fadeIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

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

.auth-form.active {
    display: block;
}

.auth-input {
    width: 100%;
    padding: 16px 20px;
    margin-bottom: 20px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 14px;
    background: var(--surface-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .auth-input {
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.auth-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.auth-input:hover {
    border-color: color-mix(in srgb, var(--theme-color) 30%, transparent);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .auth-input:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.auth-input:focus {
    outline: none;
    border-color: var(--theme-color);
    background: var(--surface-color);
    box-shadow: 0 0 0 4px rgba(26, 157, 247, 0.1), 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px) scale(1.01);
}

[data-theme="dark"] .auth-input:focus {
    box-shadow: 0 0 0 4px rgba(26, 157, 247, 0.2), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.password-input-wrapper {
    position: relative;
    margin-bottom: 20px;
}

.password-toggle {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.03);
    border: none;
    cursor: pointer;
    font-size: 18px;
    color: var(--text-secondary);
    padding: 8px;
    border-radius: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .password-toggle {
    background: rgba(255, 255, 255, 0.05);
}

.password-toggle:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--theme-color);
    transform: translateY(-50%) scale(1.1);
}

[data-theme="dark"] .password-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

.password-toggle:active {
    transform: translateY(-50%) scale(0.95);
}

.forgot-password {
    text-align: right;
    margin-bottom: 24px;
    background: none;
    border: none;
    color: var(--theme-color);
    font-family: 'Poppins', sans-serif;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
}

.forgot-password::after {
    content: '';
    position: absolute;
    bottom: 4px;
    left: 12px;
    right: 12px;
    height: 2px;
    background: var(--theme-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.forgot-password:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.auth-button {
    width: 100%;
    padding: 16px 24px;
    border: none;
    border-radius: 14px;
    background: color-mix(in srgb, var(--theme-color) 10%, white);
    color: var(--theme-color);
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 16px;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    letter-spacing: 0.5px;
    z-index: 1;
}

[data-theme="dark"] .auth-button {
    background: color-mix(in srgb, var(--theme-color) 15%, var(--surface-color));
}

.auth-button::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: var(--theme-color);
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: 14px;
}

.auth-button:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 8px 24px rgba(26, 157, 247, 0.3);
    color: white;
}

.auth-button:hover::before {
    height: 100%;
}

.auth-button:active {
    transform: translateY(-1px) scale(0.98);
    transition: all 0.1s;
}

.auth-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-button:disabled:hover {
    transform: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.auth-switch {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 8px;
}

.theme-color-link {
    color: var(--theme-color);
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: 6px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-block;
    position: relative;
}

.theme-color-link::after {
    content: '';
    position: absolute;
    bottom: 2px;
    left: 8px;
    right: 8px;
    height: 2px;
    background: var(--theme-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-color-link:hover {
    background: color-mix(in srgb, var(--theme-color) 10%, transparent);
    transform: translateY(-2px);
}

.theme-color-link:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

.auth-footer {
    text-align: center;
    margin-top: 48px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    letter-spacing: 0.5px;
    opacity: 0.7;
    transition: opacity 0.3s ease;
}

.auth-footer:hover {
    opacity: 1;
}

/* Home Page */
#home-page {
    background: var(--bg-color);
    min-height: 100vh;
    position: relative;
    overflow: hidden;
}

.app-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    position: fixed;
    top: 0;
    left: 0;
    z-index: 1000;
    backdrop-filter: blur(20px) saturate(180%);
    background: rgba(255, 255, 255, 0.72);
    border-bottom: 1px solid rgba(0, 0, 0, 0.03);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), left 0.4s cubic-bezier(0.4, 0, 0.2, 1), all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 16px;
    width: 100%;
}

#home-page:has(.settings-panel.active) .app-header {
    width: calc(100% - 320px);
    left: 320px;
}

@media (max-width: 768px) {
    #home-page:has(.settings-panel.active) .app-header {
        width: calc(100% - 85vw);
        left: 85vw;
    }
}

[data-theme="dark"] .app-header {
    background: rgba(24, 24, 24, 0.7);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 24px;
    flex: 1;
    justify-content: center;
}

.nav-link {
    border: none;
    background: transparent;
    padding: 10px 16px;
    border-radius: 999px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.nav-link:hover {
    color: var(--theme-color);
    background: transparent;
}

.nav-link.active {
    color: var(--theme-color);
    background: transparent;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 16px;
    right: 16px;
    bottom: 6px;
    height: 2px;
    background: var(--theme-color);
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-link:hover::after,
.nav-link.active::after {
    transform: scaleX(1);
    transform-origin: left;
}

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

.app-icon {
    width: 32px;
    height: 32px;
    object-fit: contain;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
    margin-left: 30px;
}

.app-icon:hover {
    transform: scale(1.1) rotate(5deg);
}

.app-title {
    font-family: 'Arizonia', cursive;
    font-size: 28px;
    font-weight: bold;
    color: var(--theme-color);
    letter-spacing: -0.5px;
    margin: 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.header-left:hover .app-icon {
    transform: scale(1.1) rotate(5deg);
}

.header-search-container {
    flex: 0 0 auto;
    width: 260px;
    position: relative;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .main-nav {
        display: none;
    }

    .header-search-container {
        width: 180px;
    }
    
    .app-title {
        font-size: 24px;
    }
}

@media (max-width: 480px) {
    .header-search-container {
        width: 140px;
    }

    .primary-auth-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
}

.primary-auth-btn {
    border: none;
    border-radius: 999px;
    padding: 10px 18px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    background: var(--theme-color);
    color: #ffffff;
    box-shadow: 0 8px 18px rgba(26, 157, 247, 0.4);
    transition: all 0.25s ease;
    white-space: nowrap;
}

.primary-auth-btn.large {
    padding: 14px 26px;
    font-size: 15px;
}

.primary-auth-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(26, 157, 247, 0.55);
}

.icon-btn {
    background: rgba(0, 0, 0, 0.04);
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--text-color);
}

.icon-btn:hover {
    background: rgba(0, 0, 0, 0.08);
    color: var(--theme-color);
}

/* Hero section */
.hero-section {
    max-width: 1200px;
    margin: 112px auto 56px;
    padding: 0 24px;
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
    gap: 40px;
    align-items: center;
}

.hero-text h2 {
    font-size: 40px;
    line-height: 1.1;
    margin-bottom: 16px;
    letter-spacing: -1px;
    font-weight: 700;
}

.hero-eye brow,
.hero-eyebrow {
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.16em;
    color: var(--theme-color);
    margin-bottom: 10px;
    font-weight: 600;
}

.hero-subtitle {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 20px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.hero-secondary-text {
    font-size: 30px;
    color: var(--theme-color);
    margin-bottom: 70px;
}

.hero-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    min-width: 90px;
}

.stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.hero-media {
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero-card {
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.16);
    background: var(--surface-color);
    position: relative;
}

.hero-image {
    display: block;
    width: 100%;
    height: auto;
}

.hero-card-badge {
    position: absolute;
    bottom: 12px;
    left: 12px;
    padding: 8px 14px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    font-size: 11px;
}

@media (max-width: 900px) {
    .hero-section {
        grid-template-columns: minmax(0, 1fr);
        margin-top: 88px;
    }

    .hero-media {
        order: -1;
    }
}

/* Suggestions / info section */
.info-section {
    max-width: 1200px;
    margin: 0 auto 56px;
    padding: 0 24px;
}

.info-section h3 {
    font-size: 24px;
    margin-bottom: 6px;
}

.info-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 18px;
}

.info-card {
    padding: 18px 18px 20px;
    border-radius: 18px;
    background: var(--surface-color);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.06);
    border: 1px solid rgba(0, 0, 0, 0.04);
}

.info-card h4 {
    font-size: 16px;
    margin-bottom: 8px;
}

.info-card p {
    font-size: 13px;
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .info-grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Notes section wrapper */
.notes-section {
    max-width: 1200px;
    margin: 0 auto 64px;
    padding: 16px 24px 0;
}

.notes-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 8px;
}

.notes-section-header h3 {
    font-size: 22px;
}

.notes-section-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
}

.notes-search-row {
    margin-top: 12px;
    max-width: 360px;
}

/* Todoos highlight section on home */
.todoos-highlight-section {
    max-width: 1200px;
    margin: 0 auto 80px;
    padding: 32px 24px;
}

.todoos-highlight-inner {
    border-radius: 24px;
    padding: 28px 28px;
    background: linear-gradient(135deg, color-mix(in srgb, var(--theme-color) 14%, #ffffff) 0%, color-mix(in srgb, var(--theme-color) 4%, #f5f5f5) 100%);
    display: grid;
    grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr);
    gap: 32px;
    align-items: center;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    transition:
        background 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
        transform 0.35s cubic-bezier(0.22, 0.61, 0.36, 1),
        box-shadow 0.35s cubic-bezier(0.22, 0.61, 0.36, 1);
}

.todoos-highlight-inner:hover {
    transition: all 0.35s ease-in-out;
    background: linear-gradient(135deg, color-mix(in srgb, var(--theme-color) 8%, #eef4ff) 0%, #ffffff 100%);
}

[data-theme="dark"] .todoos-highlight-inner {
    background: linear-gradient(135deg, color-mix(in srgb, var(--theme-color) 30%, #050510) 0%, #050510 100%);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.8);
}

.todoos-highlight-text h3 {
    font-size: 28px;
    margin-bottom: 8px;
}

.todoos-highlight-subtitle {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.todoos-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.todoos-feature-list li::before {
    content: '•';
    margin-right: 6px;
    color: var(--theme-color);
}

.todoos-highlight-visual {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

/* Hover arrow indicator for todoos highlight */
.todoos-highlight-inner::after {
    content: '→';
    position: absolute;
    right: 26px;
    bottom: 24px;
    font-size: 22px;
    font-weight: 600;
    color: var(--theme-color);
    opacity: 0;
    transform: translateX(-12px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.todoos-highlight-inner:hover::after {
    opacity: 1;
    transform: translateX(0);
}

.todoos-pill-row {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.todoos-pill {
    padding: 6px 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.85);
    font-size: 11px;
    font-weight: 600;
    color: #333;
}

[data-theme="dark"] .todoos-pill {
    background: rgba(0, 0, 0, 0.4);
    color: #f5f5f5;
}

.todoos-preview-card {
    border-radius: 18px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.95);
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
}

[data-theme="dark"] .todoos-preview-card {
    background: rgba(10, 10, 10, 0.95);
}

.todoos-preview-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
}

.todoos-preview-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--theme-color);
}

.todoos-preview-title {
    font-size: 13px;
    font-weight: 600;
}

.todoos-preview-body {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 10px;
}

.todoos-preview-checks {
    display: flex;
    flex-direction: column;
    gap: 4px;
    font-size: 12px;
}

@media (max-width: 900px) {
    .todoos-highlight-inner {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* Android feature section */
.android-section {
    max-width: 1200px;
    margin: 0 auto 96px;
    padding: 0 24px;
}

.android-image-wrapper {
    position: relative;
    border-radius: 32px;
    overflow: hidden;
}

.android-bg {
    width: 100%;
    display: block;
    height: auto;
}

.android-bg-dark {
    display: none;
}

[data-theme="dark"] .android-bg-light {
    display: none;
}

[data-theme="dark"] .android-bg-dark {
    display: block;
}

.android-text h3,
.android-overlay h3 {
    font-size: 30px;
    margin-bottom: 12px;
    letter-spacing: -0.03em;
}

.android-subtitle {
    font-size: 14px;
    margin-bottom: 14px;
}

.android-feature-list {
    list-style: none;
    padding: 0;
    margin: 0 0 18px 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 13px;
}

.android-feature-list li::before {
    content: '•';
    margin-right: 6px;
    color: var(--theme-color);
}

.android-badge-row {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
}

.android-badge {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.98);
    color: #f9fafb;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.55);
}

[data-theme="dark"] .android-badge {
    background: rgba(15, 23, 42, 0.9);
}

.badge-chip {
    padding: 4px 10px;
    border-radius: 999px;
    background: var(--theme-color);
    font-size: 11px;
    font-weight: 600;
}

.badge-text {
    display: flex;
    flex-direction: column;
}

.badge-title {
    font-size: 13px;
    font-weight: 600;
}

.badge-subtitle {
    font-size: 11px;
    opacity: 0.85;
}

.android-overlay {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    padding: 18px 24px 16px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.85), transparent 55%);
    color: #f9fafb;
}

[data-theme="dark"] .android-overlay {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent 55%);
}

.android-overlay .android-subtitle,
.android-overlay .android-feature-list,
.android-overlay .android-feature-list li,
.android-overlay .badge-subtitle {
    color: #f9fafb9c;
}

.android-extra {
    max-height: 0;
    overflow: hidden;
    opacity: 0;
    transform: translateY(6px);
    transition:
        max-height 0.35s ease,
        opacity 0.25s ease,
        transform 0.25s ease;
}

.android-image-wrapper:hover .android-extra {
    max-height: 999px;
    opacity: 1;
    transform: translateY(0);
}

.phone-notch {
    width: 110px;
    height: 14px;
    border-radius: 0 0 999px 999px;
    background: #020617;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.phone-notch::before,
.phone-notch::after {
    content: '';
    display: block;
    border-radius: 999px;
    background: #020617;
}

.phone-notch::before {
    width: 28px;
    height: 4px;
}

.phone-notch::after {
    width: 8px;
    height: 8px;
    background: radial-gradient(circle at 30% 30%, #38bdf8, #020617);
}

.phone-screen {
    border-radius: 30px;
    background: #0b1120;
    padding: 6px;
    box-shadow: inset 0 0 0 2px rgba(15, 23, 42, 0.9);
    flex: 1;
    display: flex;
    flex-direction: column;
}

.phone-screen-inner {
    border-radius: 24px;
    background: #ffffff;
    padding: 12px 12px 12px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.phone-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.phone-logo {
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--theme-color);
    color: #fff;
    font-size: 14px;
}

.phone-title {
    font-size: 12px;
    font-weight: 600;
}

.phone-card {
    border-radius: 14px;
    padding: 11px 11px 12px;
    background: #ffffff;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.12);
    margin-bottom: 8px;
}

.phone-card.secondary {
    background: #f3f4f6;
    box-shadow: none;
}

.phone-chip {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    font-size: 10px;
    margin-bottom: 4px;
}

.phone-card-title {
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 4px;
}

.phone-card-body {
    font-size: 11px;
    color: #4b5563;
}

.phone-card.secondary .phone-card-title {
    margin-bottom: 0;
}

/* Side buttons */
.phone-frame::before,
.phone-frame::after {
    content: '';
    position: absolute;
    right: -2px;
    width: 3px;
    border-radius: 999px;
    background: #020617;
}

.phone-frame::before {
    top: 70px;
    height: 36px;
}

.phone-frame::after {
    top: 120px;
    height: 22px;
}

/* Hover animation for Android card */
.android-inner:hover .phone-frame {
    transform: translateY(-10px) rotate(0deg) scale(1.03);
    box-shadow:
        0 32px 80px rgba(15, 23, 42, 0.85),
        0 0 0 1px rgba(148, 163, 184, 0.35);
}

@media (max-width: 900px) {
    .android-inner {
        grid-template-columns: minmax(0, 1fr);
    }
}

.header-search-input {
    width: 100%;
    padding: 12px 40px 12px 16px;
    border: 2px solid rgba(0, 0, 0, 0.08);
    border-radius: 24px;
    background: rgba(0, 0, 0, 0.03);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

[data-theme="dark"] .header-search-input {
    background: rgba(255, 255, 255, 0.05);
    border: 2px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.header-search-input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.header-search-input:hover {
    border-color: color-mix(in srgb, var(--theme-color) 30%, transparent);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .header-search-input:hover {
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
}

.header-search-input:focus {
    outline: none;
    border-color: var(--theme-color);
    background: var(--surface-color);
    box-shadow: 0 0 0 4px rgba(26, 157, 247, 0.1), 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px) scale(1.01);
}

[data-theme="dark"] .header-search-input:focus {
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px rgba(26, 157, 247, 0.2), 0 4px 12px rgba(0, 0, 0, 0.4);
}

.search-clear-btn {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 16px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 6px;
    border-radius: 50%;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 1;
}

[data-theme="dark"] .search-clear-btn {
    background: rgba(255, 255, 255, 0.1);
}

.search-clear-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: var(--theme-color);
    transform: translateY(-50%) scale(1.1) rotate(90deg);
}

[data-theme="dark"] .search-clear-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* App title removed from header - search is now centered */

.menu-toggle {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    border-radius: 8px;
}

.menu-toggle:hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
    color: var(--theme-color);
}

[data-theme="dark"] .menu-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Search bar styles removed - search is now in header */

.search-results {
    padding: 20px;
    margin-top: 8px;
}

.search-results.hidden {
    display: none;
}

/* Notes Container */
.notes-container {
    padding: 24px 16px 120px;
    max-width: 1200px;
    margin: 0 auto;
}

.notes-loading {
    text-align: center;
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.notes-list {
    display: grid;
    gap: 16px;
}

/* Grid view is a staggered (masonry) layout: cards keep their natural height */
.notes-list.grid-view {
    display: block;
    columns: 300px;
    column-gap: 20px;
}

.notes-list.grid-view .note-card {
    break-inside: avoid;
    margin-bottom: 20px;
}

/* Let grid cards grow taller than list rows so the columns visibly stagger */
.notes-list.grid-view .note-content-preview {
    -webkit-line-clamp: 6;
}

.note-card {
    background: var(--surface-color);
    border-radius: 20px;
    padding: 20px;
    border: 1px solid rgba(0, 0, 0, 0.06);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

[data-theme="dark"] .note-card {
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.note-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--theme-color);
    transform: scaleY(0);
    transform-origin: bottom;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.note-card:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
    border-color: var(--theme-color);
    background: var(--surface-color);
}

[data-theme="dark"] .note-card:hover {
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    background: rgba(255, 255, 255, 0.02);
}

.note-card:hover::before {
    transform: scaleY(1);
}

.note-card:active {
    transform: translateY(-2px) scale(0.99);
    transition: all 0.1s;
}

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

.note-avatar {
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--theme-color), color-mix(in srgb, var(--theme-color) 70%, transparent));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    color: white;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

.note-card:hover .note-avatar {
    transform: rotate(5deg) scale(1.1);
    box-shadow: 0 4px 12px rgba(26, 157, 247, 0.3);
}

.note-title {
    flex: 1;
    font-weight: 600;
    color: var(--text-color);
    font-size: 17px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    transition: color 0.3s ease;
    letter-spacing: -0.2px;
}

.note-card:hover .note-title {
    color: var(--theme-color);
}

.note-content-preview {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 16px;
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    transition: color 0.3s ease;
}

.note-card:hover .note-content-preview {
    color: var(--text-color);
}

.note-urls {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 10px;
}

.note-url {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    background: color-mix(in srgb, var(--theme-color) 12%, transparent);
    border: 1px solid color-mix(in srgb, var(--theme-color) 30%, transparent);
    border-radius: 12px;
    font-size: 12px;
    color: var(--theme-color);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

.note-url:hover {
    background: color-mix(in srgb, var(--theme-color) 20%, transparent);
    border-color: var(--theme-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 157, 247, 0.2);
}

.note-checklist-preview {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--theme-color);
    font-weight: 500;
    margin-bottom: 12px;
    padding: 6px 12px;
    background: color-mix(in srgb, var(--theme-color) 10%, transparent);
    border-radius: 12px;
    width: fit-content;
    transition: all 0.3s ease;
}

.note-card:hover .note-checklist-preview {
    background: color-mix(in srgb, var(--theme-color) 15%, transparent);
    transform: translateX(4px);
}

.note-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 15px;
}

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

.note-action-btn {
    background: color-mix(in srgb, var(--theme-color) 15%, transparent);
    border: none;
    padding: 8px 16px;
    border-radius: 20px;
    color: var(--theme-color);
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.note-action-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: color-mix(in srgb, var(--theme-color) 20%, transparent);
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: 20px;
}

.note-action-btn:hover {
    background: color-mix(in srgb, var(--theme-color) 25%, transparent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 157, 247, 0.2);
}

.note-action-btn:hover::before {
    height: 100%;
}

.note-action-btn:active {
    transform: translateY(0);
}

.note-favorite-btn {
    background: none;
    border: none;
    font-size: 22px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.note-favorite-btn:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--theme-color);
    transform: scale(1.2) rotate(10deg);
}

[data-theme="dark"] .note-favorite-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

.note-favorite-btn.favorited {
    color: var(--theme-color);
    animation: heartBeat 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes heartBeat {
    0%, 100% { transform: scale(1); }
    25% { transform: scale(1.3); }
    50% { transform: scale(1.1); }
    75% { transform: scale(1.2); }
}

.note-delete-btn {
    padding: 10px 24px;
    background: color-mix(in srgb, var(--theme-color) 10%, white);
    color: var(--theme-color);
    border: none;
    border-radius: 24px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    z-index: 1;
}

[data-theme="dark"] .note-delete-btn {
    background: color-mix(in srgb, var(--theme-color) 15%, var(--surface-color));
}

.note-delete-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: var(--theme-color);
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: 24px;
}

.note-delete-btn:hover {
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 6px 20px rgba(26, 157, 247, 0.3);
    border-radius: 20px;
    color: white;
}

.note-delete-btn:hover::before {
    height: 100%;
}

.note-delete-btn:active {
    transform: translateY(0) scale(0.98);
}

.empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    font-size: 18px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
}

.empty-state::before {
    content: '📝';
    font-size: 64px;
    margin-bottom: 24px;
    opacity: 0.5;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
}

.empty-state p {
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.empty-state.hidden {
    display: none;
}

/* FAB Container */
.fab-container {
    position: fixed;
    bottom: 28px;
    right: 28px;
    display: flex;
    flex-direction: row-reverse;
    gap: 16px;
    align-items: center;
    z-index: 50;
    pointer-events: none;
}

.fab {
    border: none;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: visible;
    z-index: 1;
    pointer-events: auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.fab::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: var(--theme-color);
    transition: height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

/* Creative FAB - Hexagonal badge style */
.creative-fab {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    padding: 0;
    background: linear-gradient(135deg, var(--surface-color), color-mix(in srgb, var(--surface-color) 95%, white));
    color: var(--theme-color);
    border: 2px solid rgba(0, 0, 0, 0.06);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(20px);
    transform: rotate(-5deg);
}

[data-theme="dark"] .creative-fab {
    background: linear-gradient(135deg, var(--surface-color), color-mix(in srgb, var(--surface-color) 95%, black));
    border: 2px solid rgba(255, 255, 255, 0.12);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.fab-emoji {
    font-size: 24px;
    display: block;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.creative-fab::before {
    border-radius: 12px;
}

.creative-fab:hover {
    transform: translateY(-8px) rotate(0deg) scale(1.1);
    border-color: var(--theme-color);
    box-shadow: 0 12px 28px rgba(26, 157, 247, 0.3);
    color: white;
}

.creative-fab:hover .fab-emoji {
    transform: scale(1.2) rotate(10deg);
}

.creative-fab:hover::before {
    height: 100%;
}

/* Add FAB - Pill-shaped prominent button */
.add-fab {
    min-width: 140px;
    height: 56px;
    border-radius: 28px;
    padding: 0 24px;
    background: var(--theme-color);
    color: white;
    box-shadow: 0 8px 24px rgba(26, 157, 247, 0.35);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 10px;
    position: relative;
}

.add-fab::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 30px;
    padding: 2px;
    background: linear-gradient(135deg, var(--theme-color), color-mix(in srgb, var(--theme-color) 70%, transparent));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: -2;
}

.add-fab::before {
    border-radius: 28px;
    background: rgba(255, 255, 255, 0.2);
}

.fab-icon {
    font-size: 32px;
    font-weight: 200;
    line-height: 1;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
}

.fab-text {
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.3px;
    transition: transform 0.3s ease;
}

.add-fab:hover {
    transform: translateY(-6px);
    box-shadow: 0 16px 40px rgba(26, 157, 247, 0.45);
    min-width: 150px;
}

.add-fab:hover::after {
    opacity: 1;
}

.add-fab:hover .fab-icon {
    transform: rotate(90deg) scale(1.1);
    background: rgba(255, 255, 255, 0.25);
}

.add-fab:hover .fab-text {
    transform: translateX(2px);
}

.add-fab:hover::before {
    height: 100%;
}

.fab:active {
    transform: translateY(-4px) scale(0.98);
    transition: all 0.1s;
}

.add-fab:active {
    min-width: 145px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .fab-container {
        bottom: 20px;
        right: 20px;
        gap: 12px;
    }
    
    .add-fab {
        min-width: 120px;
        height: 52px;
        padding: 0 20px;
        gap: 8px;
    }
    
    .fab-icon {
        font-size: 28px;
        width: 28px;
        height: 28px;
    }
    
    .fab-text {
        font-size: 14px;
    }
    
    .creative-fab {
        width: 48px;
        height: 48px;
    }
    
    .fab-emoji {
        font-size: 20px;
    }
    
    .add-fab:hover {
        min-width: 130px;
    }
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--surface-color);
    border-radius: 24px;
    padding: 32px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

[data-theme="dark"] .modal-content {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.note-modal-content {
    max-width: 800px;
}

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

.modal-header h2 {
    font-size: 28px;
    font-weight: bold;
    letter-spacing: -0.5px;
}

.close-modal {
    background: rgba(0, 0, 0, 0.05);
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
    padding: 8px;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .close-modal {
    background: rgba(255, 255, 255, 0.1);
}

.close-modal:hover {
    background: rgba(0, 0, 0, 0.1);
    transform: rotate(90deg) scale(1.1);
    color: var(--theme-color);
}

[data-theme="dark"] .close-modal:hover {
    background: rgba(255, 255, 255, 0.15);
}

.close-modal:active {
    transform: rotate(90deg) scale(0.95);
}

/* Form Elements */
.note-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

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

.form-input {
    flex: 1;
    padding: 15px;
    border: none;
    border-radius: 15px;
    background: var(--glass-bg);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

.form-input:focus {
    outline: none;
    background: var(--surface-color);
}

.form-textarea {
    padding: 15px;
    border: none;
    border-radius: 15px;
    background: var(--glass-bg);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    resize: vertical;
    min-height: 200px;
}

.form-textarea.large {
    min-height: 400px;
}

.form-textarea:focus {
    outline: none;
    background: var(--surface-color);
}

.favorite-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--theme-color);
    cursor: pointer;
    padding: 10px;
}

.favorite-btn.favorited {
    color: var(--theme-color);
}

/* Checklist */
.checklist-section {
    padding: 12px;
    background: var(--glass-bg);
    border-radius: 15px;
}

.checklist-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    font-weight: bold;
    color: var(--theme-color);
}

.checklist-input-row {
    display: flex;
    gap: 8px;
    margin-bottom: 10px;
}

.checklist-input {
    flex: 1;
    padding: 10px 12px;
    border: none;
    border-radius: 10px;
    background: var(--surface-color);
    color: var(--text-color);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
}

.checklist-input:focus {
    outline: none;
}

.add-checklist-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--theme-color);
    cursor: pointer;
    padding: 10px;
}

.checklist-items {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

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

.checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--theme-color);
}

.checklist-item-text {
    flex: 1;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
}

.checklist-item-text.checked {
    text-decoration: line-through;
    color: var(--text-secondary);
}

.checklist-item-remove {
    background: none;
    border: none;
    color: red;
    cursor: pointer;
    font-size: 18px;
    padding: 5px;
}

.save-note-btn {
    padding: 15px;
    background: color-mix(in srgb, var(--theme-color) 10%, white);
    color: var(--theme-color);
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

[data-theme="dark"] .save-note-btn {
    background: color-mix(in srgb, var(--theme-color) 15%, var(--surface-color));
}

.save-note-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: var(--theme-color);
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: 50px;
}

.save-note-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(26, 157, 247, 0.3);
    color: white;
}

.save-note-btn:hover::before {
    height: 100%;
}

/* View Note Page */
#view-note-page {
    padding: 20px;
}

/* Developer page and contact section */
#developer-page {
    padding: 0;
    background: var(--bg-color);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

.developer-content {
    flex: 1;
    padding: 32px 20px 48px;
    display: flex;
    align-items: flex-start;
    justify-content: center;
    overflow-y: auto;
}

.developer-card {
    background: var(--surface-color);
    border-radius: 24px;
    padding: 40px 32px 32px;
    max-width: 640px;
    width: 100%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.06);
    text-align: center;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .developer-card {
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.developer-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12);
}

[data-theme="dark"] .developer-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

.developer-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--theme-color), color-mix(in srgb, var(--theme-color) 70%, transparent));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    font-size: 48px;
    box-shadow: 0 8px 24px rgba(26, 157, 247, 0.3);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.developer-card:hover .developer-avatar {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 12px 32px rgba(26, 157, 247, 0.4);
}

.developer-name {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.developer-role {
    font-size: 16px;
    color: var(--text-secondary);
    margin: 0 0 16px 0;
    font-weight: 500;
}

.developer-intro {
    font-size: 14px;
    color: var(--text-secondary);
    margin-bottom: 24px;
    line-height: 1.7;
    text-align: left;
}

.developer-info {
    display: flex;
    flex-direction: column;
    gap: 20px;
    margin-bottom: 32px;
    text-align: left;
}

.info-item {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

[data-theme="dark"] .info-item {
    background: rgba(255, 255, 255, 0.03);
}

.info-item:hover {
    background: rgba(0, 0, 0, 0.04);
    transform: translateX(4px);
}

[data-theme="dark"] .info-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.info-icon {
    font-size: 24px;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: color-mix(in srgb, var(--theme-color) 10%, transparent);
    border-radius: 12px;
    flex-shrink: 0;
}

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

.info-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.info-value {
    font-size: 15px;
    color: var(--text-color);
    font-weight: 600;
}

.developer-skills {
    margin-bottom: 32px;
    text-align: left;
}

.skills-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0 0 16px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.skills-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.skill-tag {
    padding: 8px 16px;
    background: color-mix(in srgb, var(--theme-color) 10%, transparent);
    color: var(--theme-color);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
    border: 1px solid color-mix(in srgb, var(--theme-color) 20%, transparent);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: default;
}

.skill-tag:hover {
    background: color-mix(in srgb, var(--theme-color) 20%, transparent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(26, 157, 247, 0.2);
}

.developer-footer {
    padding-top: 24px;
    border-top: 1px solid var(--border-color);
}

.developer-quote {
    font-size: 14px;
    color: var(--text-secondary);
    font-style: italic;
    margin: 0;
    line-height: 1.6;
}

@media (max-width: 768px) {
    .developer-content {
        padding: 24px 16px;
    }
    
    .developer-card {
        padding: 32px 24px;
    }
    
    .developer-avatar {
        width: 80px;
        height: 80px;
        font-size: 40px;
    }
    
    .developer-name {
        font-size: 28px;
    }
}

/* (contact-section removed) */

/* Developer contact form */
.developer-form {
    margin-top: 8px;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.developer-form-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.developer-form-field {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.developer-form-field label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
}

.developer-form-field input,
.developer-form-field textarea {
    padding: 12px 14px;
    border-radius: 12px;
    border: 1px solid rgba(0, 0, 0, 0.08);
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    background: var(--surface-color);
    color: var(--text-color);
    transition: border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

[data-theme="dark"] .developer-form-field input,
[data-theme="dark"] .developer-form-field textarea {
    border-color: rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.02);
}

.developer-form-field input:focus,
.developer-form-field textarea:focus {
    outline: none;
    border-color: var(--theme-color);
    box-shadow: 0 0 0 3px rgba(26, 157, 247, 0.15);
    background: var(--bg-color);
}

.developer-form-field textarea {
    resize: vertical;
    min-height: 140px;
}

.developer-submit-btn {
    margin-top: 8px;
    align-self: flex-start;
}

.developer-small-print {
    margin-top: 8px;
    font-size: 11px;
    color: var(--text-secondary);
}

/* Hide creative page on home page and when viewing a note */
#home-page.active ~ #creative-page,
#view-note-page.active ~ #creative-page,
body:has(#home-page.active) #creative-page,
body:has(#view-note-page.active) #creative-page,
body:has(#view-note-page.active) .fab-container {
    display: none !important;
}

/* Show creative page only when creative-page is active */
#creative-page:not(.active) {
    display: none !important;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 0;
}

.back-button {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 10px;
}

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

.header-action-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 10px;
}

.view-note-content {
    max-width: 800px;
    margin: 0 auto;
}

.view-note-title {
    font-size: 25px;
    font-weight: bold;
    margin-bottom: 20px;
    word-break: break-word;
}

.view-note-body {
    font-size: 30px;
    font-weight: bold;
    line-height: 1.2;
    margin-bottom: 30px;
    word-break: break-word;
}

.view-note-checklist {
    margin: 20px 0;
    padding: 20px 0;
    border-top: 1px solid var(--border-color);
}

.view-checklist-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
}

.view-checklist-item input[type="checkbox"] {
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: var(--theme-color);
}

.view-checklist-item-text {
    flex: 1;
    font-size: 16px;
}

.view-checklist-item-text.checked {
    color: var(--text-secondary);
}

.view-note-timestamps {
    margin-top: 30px;
    font-size: 10px;
    color: var(--text-secondary);
}

.view-note-urls {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin: 20px 0;
}

.view-note-url {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    background: color-mix(in srgb, var(--theme-color) 20%, transparent);
    border: 1.5px solid color-mix(in srgb, var(--theme-color) 40%, transparent);
    border-radius: 10px;
    font-size: 14px;
    color: var(--theme-color);
    text-decoration: none;
    cursor: pointer;
    font-weight: 600;
}

/* Creative Fields Page */
#creative-fields-page {
    padding: 20px;
}

.creative-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    height: calc(100vh - 100px);
}

.creative-save-btn {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--theme-color);
    cursor: pointer;
    padding: 8px 12px;
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 1;
}

.creative-save-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    color: var(--text-secondary);
}

.creative-save-btn:not(:disabled):hover {
    background: rgba(0, 0, 0, 0.05);
    transform: scale(1.1);
}

[data-theme="dark"] .creative-save-btn:not(:disabled):hover {
    background: rgba(255, 255, 255, 0.1);
}

/* Creative Page */
#creative-page {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 50px 20px;
    background: linear-gradient(135deg, #E1FBF5 0%, #F1F1F1 100%);
}

.creative-card-container {
    text-align: center;
}

.creative-card {
    background: white;
    border-radius: 30px;
    padding: 30px;
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.1);
    max-width: 500px;
    margin: 0 auto 30px;
}

.creative-card-content {
    text-align: left;
}

.creative-quote {
    font-size: 100px;
    line-height: 1;
    opacity: 0.3;
    margin-bottom: 20px;
}

.creative-card-content h3 {
    font-size: 20px;
    font-weight: bold;
    margin-bottom: 15px;
}

.creative-card-content p {
    font-size: 30px;
    line-height: 1.2;
    color: rgba(0, 0, 0, 0.6);
    margin-bottom: 30px;
}

.creative-footer {
    text-align: right;
    font-size: 14px;
    color: rgba(0, 0, 0, 0.3);
}

.save-card-btn {
    padding: 15px 30px;
    background: white;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    position: relative;
    overflow: hidden;
    z-index: 1;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.save-card-btn::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 0;
    background: rgba(0, 0, 0, 0.05);
    transition: height 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
    border-radius: 50px;
}

.save-card-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
}

.save-card-btn:hover::before {
    height: 100%;
}

/* Settings Side Panel */
.settings-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 320px;
    max-width: 85%;
    height: 100vh;
    z-index: 100;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--surface-color);
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    overflow-y: auto;
    backdrop-filter: blur(20px);
}

[data-theme="dark"] .settings-panel {
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.5);
}

.settings-panel.active {
    transform: translateX(0);
}

.settings-panel-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Home Content Wrapper - shrinks width when panel is active */
.home-content-wrapper {
    position: relative;
    width: 100%;
    min-height: 100vh;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1), margin-left 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    background: var(--bg-color);
    margin-left: 0;
    padding-top: 72px; /* Space for fixed header */
}

#home-page:has(.settings-panel.active) .home-content-wrapper {
    width: calc(100% - 320px);
    margin-left: 320px;
}

@media (max-width: 768px) {
    #home-page:has(.settings-panel.active) .home-content-wrapper {
        width: calc(100% - 85vw);
        margin-left: 85vw;
    }
}

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

.drawer-header h2 {
    font-size: 30px;
    font-weight: bold;
}

.close-drawer {
    background: none;
    border: none;
    font-size: 24px;
    color: var(--text-color);
    cursor: pointer;
}

.settings-content {
    padding: 20px;
}

.settings-section {
    margin-bottom: 30px;
}

.settings-section h3 {
    font-size: 30px;
    font-weight: bold;
    margin-bottom: 15px;
}

.settings-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid var(--border-color);
}

.settings-label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

/* Switch Toggle */
.switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 24px;
}

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

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: 0.3s;
    border-radius: 24px;
}

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

input:checked + .slider {
    background-color: var(--theme-color);
}

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

/* Color Options */
.color-options {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

.color-option {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    cursor: pointer;
    border: 3px solid transparent;
    transition: all 0.3s;
}

.color-option:hover {
    transform: scale(1.1);
}

.color-option.active {
    border-color: var(--text-color);
    box-shadow: 0 0 0 3px var(--bg-color), 0 0 0 6px var(--text-color);
}

.custom-color {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 2px dashed var(--border-color);
}

.custom-color input[type="color"] {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.custom-color span {
    font-size: 24px;
    pointer-events: none;
}

.logout-btn {
    width: 100%;
    padding: 15px;
    background: var(--theme-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-family: 'Poppins', sans-serif;
    font-weight: bold;
    cursor: pointer;
    margin-top: 20px;
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
}

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

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top-color: var(--theme-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Toast */
.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--surface-color);
    color: var(--text-color);
    padding: 15px 25px;
    border-radius: 50px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    z-index: 2000;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    transition: all 0.3s;
}

.toast.hidden {
    opacity: 0;
    transform: translateX(-50%) translateY(20px);
    pointer-events: none;
}

.toast.error {
    background: #D70040;
    color: white;
}

.toast.success {
    background: var(--theme-color);
    color: white;
}

/* Glass Effect */
body.glass-mode .app-header {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

body.glass-mode .fab {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

body.glass-mode .note-card {
    background: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--glass-border);
}

/* Responsive */
@media (max-width: 768px) {
    .notes-list.grid-view {
        columns: 1;
    }
    
    .modal-content {
        padding: 20px;
    }
    
    .drawer-content {
        width: 100%;
        max-width: 100%;
    }
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* ---------- Markdown rendering ---------- */
.markdown-body > :first-child { margin-top: 0; }
.markdown-body > :last-child { margin-bottom: 0; }
.markdown-body p { margin: 0 0 0.6em; }
.markdown-body h1,
.markdown-body h2,
.markdown-body h3,
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 {
    margin: 0.8em 0 0.35em;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.02em;
}
.markdown-body h1 { font-size: 1.5em; }
.markdown-body h2 { font-size: 1.3em; }
.markdown-body h3 { font-size: 1.15em; }
.markdown-body h4,
.markdown-body h5,
.markdown-body h6 { font-size: 1em; }
.markdown-body ul,
.markdown-body ol { margin: 0 0 0.6em; padding-left: 1.4em; }
.markdown-body li { margin: 0.15em 0; }
.markdown-body li.md-task { list-style: none; margin-left: -1.2em; }
.markdown-body li.md-task.is-done { text-decoration: line-through; opacity: 0.6; }
.markdown-body li.md-task input { margin-right: 0.35em; accent-color: var(--theme-color); }
.markdown-body a { color: var(--theme-color); text-decoration: underline; text-underline-offset: 2px; }
.markdown-body code {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 0.88em;
    padding: 0.1em 0.4em;
    border-radius: 6px;
    background: color-mix(in srgb, var(--text-color) 9%, transparent);
}
.markdown-body pre {
    margin: 0 0 0.7em;
    padding: 12px 14px;
    border-radius: 12px;
    overflow-x: auto;
    background: color-mix(in srgb, var(--text-color) 7%, transparent);
}
.markdown-body pre code { padding: 0; background: none; font-size: 0.85em; }
.markdown-body blockquote {
    margin: 0 0 0.7em;
    padding: 0.1em 0 0.1em 14px;
    border-left: 3px solid var(--theme-color);
    color: var(--text-secondary);
}
.markdown-body hr {
    border: 0;
    border-top: 1px solid color-mix(in srgb, var(--text-color) 15%, transparent);
    margin: 1em 0;
}
.markdown-body img { max-width: 100%; border-radius: 10px; }
.markdown-body del { opacity: 0.7; }

/* Card preview: keep markdown compact inside the line clamp */
.note-content-preview.markdown-body p,
.note-content-preview.markdown-body ul,
.note-content-preview.markdown-body ol,
.note-content-preview.markdown-body blockquote,
.note-content-preview.markdown-body pre { margin-bottom: 0; }
.note-content-preview.markdown-body h1,
.note-content-preview.markdown-body h2,
.note-content-preview.markdown-body h3,
.note-content-preview.markdown-body h4,
.note-content-preview.markdown-body h5,
.note-content-preview.markdown-body h6 { font-size: 1em; margin: 0; }
/* Code blocks flatten to plain flowing lines so the 2-line clamp always holds */
.note-content-preview.markdown-body pre {
    margin: 0;
    padding: 0;
    background: none;
    border-radius: 0;
    overflow: visible;
    white-space: pre-wrap;
    word-break: break-word;
}
.note-content-preview.markdown-body pre code { font-size: 0.9em; }
.note-content-preview.markdown-body blockquote { padding-top: 0; padding-bottom: 0; }
.note-content-preview.markdown-body hr { display: none; }
.note-content-preview.markdown-body img { display: none; }

/* View page: keep long-note columns tidy */
.view-note-body.markdown-body pre,
.view-note-body .markdown-body pre { break-inside: avoid; }
