/* Color Palette */
:root {
    --sage-base: #f5f7f4;
    --soft-coral-sidebar: #f0e6e0;
    --deep-coral: #b8563d;
    --white: #ffffff;
    --sage-border: #e8ebe7;
    --text-primary: #333333;
    --text-secondary: #666666;
    --text-tertiary: #999999;
    --warm-brown: #8b7355;
    --deep-coral-hover: rgba(184, 86, 61, 0.1);
    --deep-coral-hover-strong: rgba(184, 86, 61, 0.15);
    
    /* Error/Danger colors */
    --error-red: #c94f3d;
    --error-red-dark: #b23a2a;
    --error-red-darker: #9a2f20;
    --error-bg: #fdecea;
    --error-border: #f5c6c0;
    --error-border-light: #f9d9d5;
    --danger-red: #c94f3d;
    --danger-red-hover: #b23a2a;
    --danger-red-active: #9a2f20;
    
    /* Success colors */
    --success-green: #5a7a4d;
    --success-bg: #eff4ed;
    --success-border: #d4e3cf;
}

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

body {
    font-family: 'Georgia', 'Garamond', serif;
    display: flex;
    height: 100vh;
    overflow: hidden;
    background: var(--sage-base);
    color: var(--text-primary);
}

/* Left sidebar */
.sidebar {
    width: 280px;
    background: var(--soft-coral-sidebar);
    border-right: 1px solid var(--sage-border);
    display: flex;
    flex-direction: column;
    transition: margin-left 0.3s ease;
    position: relative;
    z-index: 10;
    flex-shrink: 0;
}

.sidebar.collapsed {
    margin-left: -280px;
}

/* Sidebar overlay for mobile */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 150;
    opacity: 0;
    transition: opacity 0.3s;
}

.sidebar-overlay.active {
    display: block;
    opacity: 1;
}

.sidebar-logo {
    padding: 24px 20px 16px;
    text-align: center;
    border-bottom: 1px solid var(--sage-border);
}

.sidebar-logo h1 {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: 2px;
    color: var(--warm-brown);
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.alpha-badge {
    font-family: inherit;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: 0.5px;
    background: var(--deep-coral);
    color: var(--white);
    padding: 2px 6px;
    border-radius: 4px;
}

.sidebar-header {
    padding: 20px 12px;
    padding-top: 7px;
}

.filter-input {
    width: 100%;
    max-width: 100%;
    padding: 11px 14px;
    border: 1px solid var(--sage-border);
    border-radius: 10px;
    font-size: 14px;
    background: var(--white);
    font-family: 'Georgia', serif;
    color: var(--text-primary);
    transition: all 0.2s;
    box-sizing: border-box;
}

.filter-input:focus {
    outline: none;
    border-color: var(--deep-coral);
    background: var(--white);
    box-shadow: 0 0 0 3px rgba(184, 86, 61, 0.1);
}

.filter-input::placeholder {
    color: var(--text-tertiary);
    font-style: italic;
}

.recipe-list {
    flex: 1;
    overflow-y: auto;
    padding: 0;
}

.recipe-item {
    padding: 16px 20px;
    margin-bottom: 0;
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--sage-border);
    border-radius: 0;
    cursor: pointer;
    transition: all 0.2s;
    display: block;
    text-decoration: none;
    color: inherit;
}

.recipe-item:hover {
    background: var(--deep-coral-hover);
}

.recipe-item:focus {
    outline: none;
    background: var(--deep-coral-hover);
}

.recipe-item.active {
    background: var(--deep-coral);
    color: var(--white);
    box-shadow: none;
}

.recipe-item-title {
    font-weight: normal;
    margin-bottom: 6px;
    color: inherit;
    font-size: 14px;
}

.recipe-item-date {
    font-size: 11px;
    color: inherit;
    opacity: 0.7;
    font-style: italic;
}

.new-recipe-btn {
    margin: 12px;
    padding: 12px;
    background: var(--deep-coral);
    color: var(--white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Georgia', serif;
    transition: all 0.2s;
}

.new-recipe-btn:hover {
    background: var(--deep-coral);
}

.new-recipe-btn:focus {
    outline: none;
    box-shadow: 0 0 0 4px rgba(90, 90, 90, 0.4);
}

/* Main content area */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.editor-header {
    padding: 16px 24px;
    border-bottom: 1px solid var(--sage-border);
    display: flex;
    gap: 12px;
    align-items: center;
    background: var(--white);
    transition: padding-left 0.3s ease;
}

.sidebar.collapsed ~ .main-content .editor-header {
    padding-left: 80px;
}

.title-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--sage-border);
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Georgia', serif;
    background: var(--white);
    color: var(--text-primary);
}

.title-input:focus {
    outline: none;
    border-color: var(--deep-coral);
    box-shadow: 0 0 0 3px rgba(184, 86, 61, 0.1);
}

.title-display {
    flex: 1;
    padding: 10px 0px;
    font-size: 36px;
    font-family: 'Cinzel', serif;
    color: var(--text-primary);
    font-style: normal;
    font-weight: 400;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

.edit-btn, .save-btn, .delete-btn, .copy-link-btn {
    padding: 8px 16px;
    border: 1px solid var(--sage-border);
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    font-family: 'Georgia', serif;
    transition: all 0.2s;
    background: transparent;
    color: var(--text-secondary);
}

.edit-btn:hover, .save-btn:hover, .copy-link-btn:hover {
    background: var(--sage-base);
    border-color: var(--deep-coral);
}

.edit-btn:focus, .save-btn:focus, .copy-link-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(184, 86, 61, 0.1);
}

.delete-btn {
    color: var(--error-red);
    border-color: var(--sage-border);
}

.delete-btn:hover {
    background: var(--sage-base);
    border-color: var(--sage-border);
}

.delete-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(160, 96, 96, 0.3);
}

.editor-container {
    flex: 1;
    overflow: hidden;
    position: relative;
}

.editor-content {
    width: 100%;
    height: 100%;
    padding: 40px;
    overflow-y: auto;
    background: var(--white);
}

.content-wrapper {
    flex: 1;
    position: relative;
    min-height: 500px;
    min-width: 0; /* Allow flex item to shrink below content size */
}

.markdown-textarea {
    width: 100%;
    min-height: 500px;
    padding: 40px;
    border: none;
    font-family: 'Georgia', serif;
    font-size: 14px;
    line-height: 1.8;
    resize: vertical;
    background: var(--white);
    color: var(--text-primary);
}

.markdown-textarea:focus {
    outline: none;
}

.markdown-textarea::placeholder {
    color: var(--text-tertiary);
    font-style: italic;
}

.preview-content {
    font-family: 'Georgia', serif;
    font-size: 16px;
    line-height: 1.7;
    color: var(--text-primary);
    max-width: 720px;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Markdown preview styling */
.preview-content h1 { 
    font-size: 20px; 
    font-weight: 600;
    margin: 32px 0 16px;
    line-height: 1.3;
    color: var(--text-primary);
    font-style: normal;
    letter-spacing: -0.015em;
    text-transform: uppercase;
    font-size: 13px;
    letter-spacing: 0.05em;
    font-weight: 500;
}

.preview-content h2 { 
    font-size: 17px; 
    font-weight: 500;
    margin: 28px 0 14px;
    line-height: 1.4;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.preview-content h3 { 
    font-size: 15px; 
    font-weight: 500;
    margin: 24px 0 12px;
    line-height: 1.4;
    color: var(--text-secondary);
    font-style: normal;
}

.preview-content p { 
    margin: 12px 0; 
}

.preview-content ul, .preview-content ol { 
    margin: 12px 0; 
    padding-left: 28px; 
}

.preview-content li { 
    margin: 6px 0;
    line-height: 1.6;
}

.preview-content ul li::marker {
    color: var(--text-secondary);
}

.preview-content a { 
    color: var(--deep-coral); 
    text-decoration: underline;
    text-decoration-color: var(--sage-border);
    word-break: break-all;
    overflow-wrap: break-word;
}

.preview-content a:hover { 
    color: var(--deep-coral);
    text-decoration-color: var(--deep-coral);
}

.preview-content strong { 
    font-weight: 600;
    color: var(--text-primary);
}

.preview-content em { 
    font-style: italic; 
}

.preview-content code { 
    background: var(--sage-base); 
    padding: 3px 8px; 
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: var(--text-secondary);
}

.preview-content pre {
    background: var(--sage-base);
    padding: 20px;
    border-radius: 8px;
    overflow-x: auto;
    margin: 20px 0;
    font-family: 'Courier New', monospace;
    font-size: 14px;
    border: 1px solid var(--sage-border);
}

.preview-content pre code {
    background: none;
    padding: 0;
}

.preview-content blockquote {
    border-left: 3px solid var(--deep-coral);
    padding-left: 20px;
    margin: 20px 0;
    color: var(--text-secondary);
    font-style: italic;
}

.preview-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 24px 0;
    display: block;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.preview-content hr {
    border: none;
    height: 1px;
    background: var(--sage-base);
    margin: 28px 0;
}

.empty-state {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-tertiary);
    font-size: 18px;
    font-style: italic;
}

.hidden {
    display: none !important;
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 12px;
}

::-webkit-scrollbar-track {
    background: var(--sage-base);
}

::-webkit-scrollbar-thumb {
    background: var(--sage-border);
    border-radius: 6px;
    border: 2px solid var(--sage-base);
}

::-webkit-scrollbar-thumb:hover {
    background: #d0d4cd;
}

/* Collections view */
.view-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.view-toggle button {
    flex: 1;
    padding: 8px 12px;
    background: transparent;
    border: 1px solid var(--sage-border);
    border-radius: 6px;
    font-family: 'Georgia', serif;
    font-size: 13px;
    color: var(--text-primary);
    cursor: pointer;
    transition: all 0.2s;
}

.view-toggle button:hover {
    background: var(--sage-base);
}

.view-toggle button.active {
    background: var(--deep-coral);
    color: var(--white);
    border-color: var(--deep-coral);
}

.view-toggle button:focus {
    outline: none;
    box-shadow: inset 0 0 0 2px rgba(90, 90, 90, 0.3);
}

.sidebar-content {
    flex: 1;
    overflow-y: auto;
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE/Edge */
}

.sidebar-content::-webkit-scrollbar {
    display: none; /* Chrome/Safari */
}

.collections-list {
    padding: 0;
}

.collection-item {
    padding: 16px 20px;
    border-bottom: 1px solid var(--sage-border);
    cursor: pointer;
    transition: all 0.2s;
}

.collection-item:hover {
    background: var(--deep-coral-hover);
}

.collection-item:focus {
    outline: none;
    background: var(--deep-coral-hover);
}

.collection-item.active {
    background: var(--sage-base);
    box-shadow: inset 3px 0 0 var(--deep-coral);
}

.collection-item-name {
    font-size: 16px;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.collection-item-count {
    font-size: 12px;
    color: var(--text-tertiary);
    font-style: italic;
}

.new-item-btn {
    margin: 12px;
    padding: 12px;
    background: var(--deep-coral);
    color: var(--white);
    border: 1px solid var(--text-primary);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    font-family: 'Georgia', serif;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.new-item-btn:hover {
    background: var(--text-primary);
}

.new-item-btn:focus {
    outline: 3px solid var(--deep-coral);
    outline-offset: 2px;
}

/* Collection detail view */
.collection-view {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.collection-header {
    padding: 24px 40px;
    border-bottom: 1px solid var(--sage-border);
}

.collection-title-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 8px;
}

.collection-title-section h1 {
    font-size: 18px;
    font-weight: normal;
    font-style: italic;
    color: var(--text-primary);
    margin: 0;
}

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

.collection-header-actions .collection-action-btn {
    width: 40px;
    height: 40px;
    opacity: 1;
}

.collection-action-btn-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--danger-red);
}

.collection-detail-header {
    border-bottom: 1px solid var(--sage-border);
}

.back-btn {
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-family: 'Georgia', serif;
    font-size: 13px;
    cursor: pointer;
    padding: 4px 0;
    margin-bottom: 8px;
    border-radius: 0;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    text-decoration: none;
}

.back-btn:hover {
    color: var(--deep-coral);
    text-decoration: underline;
}

.back-btn:focus {
    outline: none;
    text-decoration: underline;
}

/* Breadcrumb styles */
.breadcrumb {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 8px;
    padding: 0;
    display: flex;
    align-items: center;
    gap: 6px;
}

.breadcrumb-link {
    color: var(--text-secondary);
    text-decoration: none;
    cursor: pointer;
    transition: color 0.2s;
}

.breadcrumb-link:hover {
    color: var(--deep-coral);
    text-decoration: underline;
}

.breadcrumb-separator {
    color: var(--text-tertiary);
    font-size: 11px;
}

.breadcrumb-current {
    color: var(--text-primary);
}

.collection-title {
    font-size: 32px;
    font-weight: normal;
    font-style: italic;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.collection-description {
    font-size: 16px;
    color: var(--deep-coral);
    line-height: 1.6;
}

.collection-recipes {
    flex: 1;
    overflow-y: auto;
}

.collection-recipe-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.collection-recipe-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid var(--sage-border);
    cursor: pointer;
    transition: background-color 0.2s;
    position: relative;
}

.collection-recipe-item:hover {
    background-color: var(--white);
}

.collection-recipe-item:hover .collection-action-btn {
    opacity: 1;
}

.collection-recipe-item:focus {
    outline: none;
    background-color: var(--sage-base);
}

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

.recipe-link {
    font-size: 16px;
    color: var(--text-primary);
    text-decoration: none;
    flex: 1;
    padding-right: 16px;
}

.recipe-link:hover {
    color: var(--text-secondary);
}

.collection-recipe-item .collection-action-btn {
    opacity: 0;
    transition: opacity 0.2s;
}

/* Modal System - All modals use .modal-overlay + ModalUtils */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.4);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay:not(.hidden) {
    display: flex;
}

.modal-content {
    background: var(--white);
    border-radius: 12px;
    max-width: 500px;
    width: 90%;
    max-height: 600px;
    display: flex;
    flex-direction: column;
}

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

.modal-header h2 {
    font-size: 20px;
    font-weight: normal;
    color: var(--text-primary);
    margin: 0;
}

.modal-close {
    background: none;
    border: none;
    font-size: 28px;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s;
}

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

.follow-tabs {
    display: flex;
    border-bottom: 1px solid var(--sage-border);
}

.follow-tab {
    flex: 1;
    padding: 12px 16px;
    background: none;
    border: none;
    font-family: 'Georgia', serif;
    font-size: 15px;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.2s;
    border-bottom: 2px solid transparent;
}

.follow-tab:hover {
    color: var(--text-secondary);
    background: var(--sage-base);
}

.follow-tab.active {
    color: var(--text-secondary);
    border-bottom-color: var(--deep-coral);
}

.modal-body {
    padding: 16px 0;
    overflow-y: auto;
    flex: 1;
    position: relative;
}

.follow-list {
    display: none;
    flex-direction: column;
}

.follow-list.active {
    display: flex;
}

.follow-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 24px;
    transition: background 0.2s;
    cursor: pointer;
}

.follow-item:hover {
    background: var(--sage-base);
}

.follow-item-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.follow-item-info {
    flex: 1;
    min-width: 0;
}

.follow-item-username {
    font-size: 16px;
    color: var(--text-primary);
    font-weight: normal;
    text-decoration: none;
    display: block;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.follow-item-username:hover {
    text-decoration: underline;
}

.follow-item-bio {
    font-size: 14px;
    color: var(--text-secondary);
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.follow-item-action {
    flex-shrink: 0;
}

.follow-btn {
    padding: 8px 16px;
    border: 1px solid var(--sage-border);
    border-radius: 6px;
    background: transparent;
    color: var(--text-primary);
    font-family: 'Georgia', serif;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.follow-btn:hover {
    background: var(--sage-base);
}

.follow-btn.following {
    background: var(--deep-coral);
    color: var(--white);
    border-color: var(--deep-coral);
}

.follow-btn.following:hover {
    background: var(--text-primary);
}

.follow-empty {
    padding: 48px 24px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 15px;
}

.editor-view {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

/* Keyboard Shortcuts Modal */
.shortcuts-list {
    display: flex;
    flex-direction: column;
    gap: 24px;
    margin: 20px 0;
}

.shortcut-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--sage-border);
}

.shortcut-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    gap: 16px;
}

.shortcut-keys {
    display: flex;
    gap: 4px;
    align-items: center;
    font-family: 'Georgia', serif;
    font-size: 14px;
    color: var(--text-primary);
}

.shortcut-keys kbd {
    background: var(--sage-base);
    border: 1px solid var(--sage-border);
    border-radius: 4px;
    padding: 4px 8px;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    font-size: 12px;
    color: var(--text-primary);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

.shortcut-desc {
    font-family: 'Georgia', serif;
    font-size: 14px;
    color: var(--deep-coral);
    flex: 1;
    text-align: right;
}

/* Firebase Error Banner */
.firebase-error-banner {
    background: var(--error-bg);
    border-bottom: 1px solid var(--error-border);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    animation: slideDown 0.3s ease;
}

.firebase-error-banner.hidden {
    display: none;
}

.firebase-error-content {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 1;
}

.firebase-error-content > i {
    color: var(--error-red);
    font-size: 20px;
    flex-shrink: 0;
}

.firebase-error-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.firebase-error-text strong {
    color: var(--error-red-dark);
    font-size: 14px;
    font-weight: 600;
}

.firebase-error-text span {
    color: var(--error-red-dark);
    font-size: 13px;
    line-height: 1.4;
}

.firebase-error-close {
    background: transparent;
    border: none;
    color: var(--error-red);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
}

.firebase-error-close:hover {
    background: var(--error-border-light);
}

.firebase-error-close i {
    font-size: 16px;
}

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

@media (max-width: 768px) {
    .firebase-error-banner {
        padding: 10px 16px;
    }
    
    .firebase-error-text span {
        font-size: 12px;
    }
}

/* Navbar - minimal and elegant */
.navbar {
    display: none; /* Navbar hidden - icons shown on profile page only */
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-home-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    transition: opacity 0.2s;
}

.navbar-home-btn:hover {
    opacity: 0.85;
}

.navbar-brand h1 {
    font-size: 18px;
    font-weight: 500;
    color: var(--deep-coral);
    margin: 0;
    font-family: 'Cinzel', serif;
    letter-spacing: 0.5px;
}

.navbar-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
}

.navbar-toggle-btn {
    padding: 4px 8px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--sage-base);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Georgia', 'Garamond', serif;
}

.navbar-toggle-btn:hover {
    background: rgba(249, 247, 244, 0.15);
}

.navbar-toggle-btn:focus {
    outline: none;
    background: rgba(249, 247, 244, 0.2);
}

.nav-btn {
    padding: 4px 8px;
    background: transparent;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 14px;
    color: var(--sage-base);
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Georgia', 'Garamond', serif;
}

.nav-avatar-btn {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
    border: 2px solid rgba(249, 247, 244, 0.3);
    transition: all 0.2s;
}

.nav-avatar-btn:hover {
    border-color: rgba(249, 247, 244, 0.6);
    transform: scale(1.05);
}

.nav-btn:hover {
    background: rgba(249, 247, 244, 0.15);
    color: var(--white);
}

.nav-btn.active {
    background: rgba(249, 247, 244, 0.2);
    color: var(--white);
}

/* Navbar Dropdown */
.navbar-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--white);
    border: 1px solid var(--sage-border);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    min-width: 220px;
    z-index: 1000;
    overflow: hidden;
}

.navbar-dropdown.hidden {
    display: none;
}

.navbar-dropdown-item {
    display: flex;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    border: none;
    background: white;
    width: 100%;
    text-align: left;
    font-size: 14px;
    color: var(--text-primary);
    text-decoration: none;
    transition: background 0.2s;
}

.navbar-dropdown-item:hover {
    background: var(--sage-base);
}

.navbar-dropdown-item i {
    width: 20px;
    margin-right: 12px;
    color: var(--text-secondary);
}

.navbar-dropdown-divider {
    height: 1px;
    background: var(--sage-base);
    margin: 0;
}

/* Content area */
.content-area {
    flex: 1;
    padding: 40px;
    background: var(--sage-base);
    overflow-y: scroll;
}

.view-section {
    display: block;
}

.view-section.hidden {
    display: none;
}

/* Home view */
#homeView .empty-state {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    font-size: 13px;
    font-style: italic;
}

.home-section {
    margin-bottom: 48px;
}

.home-section:last-child {
    margin-bottom: 0;
}

/* Profile Page */
/* Profile hero - horizontal layout like Instagram */
.profile-top-bar {
    float: right;
}

.profile-hero {
    padding: 32px 40px;
    display: flex;
    gap: 32px;
    align-items: flex-start;
    position: relative;
}

.mobile-sidebar-toggle {
    display: none;
    position: absolute;
    top: 16px;
    left: 16px;
    width: 40px;
    height: 40px;
    background: var(--white);
    border: 1px solid var(--sage-border);
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    color: var(--text-secondary);
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    z-index: 100;
}

.mobile-sidebar-toggle:hover {
    background: var(--sage-base);
    border-color: var(--deep-coral);
    color: var(--deep-coral);
}

/* Desktop sidebar toggle - elegant book corner triangle */
.desktop-sidebar-toggle {
    position: fixed;
    top: 0;
    left: 0;
    width: 60px;
    height: 60px;
    background: transparent;
    border: none;
    padding: 0;
    cursor: pointer;
    z-index: 100;
    overflow: visible;
}

.desktop-sidebar-toggle::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 60px 60px 0 0;
    border-color: var(--deep-coral) transparent transparent transparent;
    /* transition: all 0.3s ease; */
}

.desktop-sidebar-toggle:hover::before {
    filter: brightness(1.15);
}

.desktop-sidebar-toggle:focus {
    outline: none;
}

/* Triangle icon positioned inside the triangle */
.desktop-sidebar-toggle i {
    position: absolute;
    top: 10px;
    left: 10px;
    color: var(--white);
    font-size: 18px;
    pointer-events: none;
    z-index: 1;
}

/* Show triangle only when sidebar is collapsed, hide when open (desktop only) */
@media (min-width: 769px) {
    .sidebar:not(.collapsed) ~ .desktop-sidebar-toggle {
        display: none;
    }

    .sidebar.collapsed ~ .desktop-sidebar-toggle {
        display: block;
    }
}

/* Inner sidebar toggle - matches outer triangle but points left */
.inner-sidebar-toggle {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 10;
    transition: opacity 0.2s;
}

.inner-sidebar-toggle::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-right: 12px solid var(--deep-coral);
    transition: border-right-color 0.2s;
}

.inner-sidebar-toggle:hover::before {
    border-right-color: var(--deep-coral-hover);
}

.sidebar.collapsed .inner-sidebar-toggle {
    display: none;
}

.profile-avatar-container {
    flex-shrink: 0;
}

.profile-avatar {
    width: 150px;
    height: 150px;
    min-height: 150px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    display: block;
}

.profile-info {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 8px;
    max-width: 600px;
}

.profile-header-top {
    margin-bottom: 10px;
}

.profile-actions {
    display: flex;
    gap: 6px;
    align-items: center;
    position: relative;
}

.profile-action-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 14px;
    color: var(--warm-brown);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.profile-action-btn:hover {
    color: var(--deep-coral);
}

.profile-action-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(184, 86, 61, 0.1);
}

.profile-username {
    font-family: 'Cinzel', Georgia, serif;
    font-size: 28px;
    color: var(--deep-coral);
    margin: 0;
    font-weight: 600;
}

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

.profile-stat {
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
}

.profile-stat-link {
    cursor: pointer;
    transition: opacity 0.15s ease;
    display: flex;
    flex-direction: row;
    align-items: baseline;
    gap: 6px;
}

.profile-stat-link:hover {
    opacity: 0.7;
}

.profile-stat-value {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-tertiary);
    font-family: 'Georgia', serif;
}

.profile-stat-label {
    font-size: 16px;
    color: var(--text-tertiary);
    font-weight: 400;
}

.profile-bio {
    font-size: 15px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
    white-space: pre-wrap;
}

.profile-follow-btn {
    padding: 8px 24px;
    background: var(--deep-coral);
    color: var(--white);
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-family: 'Georgia', serif;
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
    width: 150px;
}

.profile-follow-btn:hover {
    background: var(--deep-coral);
}

.profile-follow-btn.following {
    background: transparent;
    color: var(--deep-coral);
    border: 1px solid var(--sage-border);
}

.profile-follow-btn.following:hover {
    background: var(--sage-base);
    border-color: var(--deep-coral);
}

/* Profile Tabs */
.profile-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid var(--sage-border);
    margin-bottom: 32px;
}

.profile-tab {
    padding: 12px 24px;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    font-size: 15px;
    font-family: 'Georgia', serif;
    color: var(--text-tertiary);
    cursor: pointer;
    transition: all 0.15s ease;
    font-weight: 500;
}

.profile-tab:hover {
    color: var(--deep-coral);
}

.profile-tab.active {
    color: var(--deep-coral);
    border-bottom-color: var(--deep-coral);
}

/* Profile Tab Content */
.profile-tab-content {
    position: relative;
}

.profile-tab-panel {
    display: none;
}

.profile-tab-panel.active {
    display: block;
}

.profile-actions {
    display: flex;
    justify-content: flex-end;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
    margin-bottom: 24px;
}

.profile-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-secondary);
    font-size: 15px;
}

/* Skeleton loading states */
.home-skeleton {
    animation: fadeIn 0.3s ease;
}

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

@keyframes shimmer {
    0% { background-position: -1000px 0; }
    100% { background-position: 1000px 0; }
}

.skeleton-header {
    height: 24px;
    width: 150px;
    background: linear-gradient(90deg, var(--sage-base) 25%, var(--sage-border) 50%, var(--sage-base) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 4px;
    margin-bottom: 40px;
}

.skeleton-card {
    background: linear-gradient(90deg, var(--sage-base) 25%, var(--sage-border) 50%, var(--sage-base) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 16px;
    padding: 28px 24px;
    min-height: 120px;
}

.skeleton-avatar {
    background: linear-gradient(90deg, var(--sage-base) 25%, var(--sage-border) 50%, var(--sage-base) 75%) !important;
    background-size: 1000px 100% !important;
    animation: shimmer 2s infinite;
    position: relative;
}

.skeleton-avatar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, var(--sage-base) 25%, var(--sage-border) 50%, var(--sage-base) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 50%;
}

.skeleton-text {
    background: linear-gradient(90deg, var(--sage-base) 25%, var(--sage-border) 50%, var(--sage-base) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 4px;
    color: transparent !important;
    min-width: 60px;
    min-height: 1em;
    display: inline-block;
}

.skeleton-recipe-item {
    height: 60px;
    margin: 0 16px 8px;
    background: linear-gradient(90deg, var(--sage-base) 25%, var(--sage-border) 50%, var(--sage-base) 75%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
    border-radius: 6px;
}

/* Collections view */
.collections-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 40px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--sage-border);
}

.collections-header h2 {
    font-size: 16px;
    font-weight: normal;
    font-style: italic;
    color: var(--text-primary);
    margin: 0;
}

.new-collection-btn {
    width: 40px;
    height: 40px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    font-size: 16px;
    cursor: pointer;
    border-radius: 50%;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.new-collection-btn:hover {
    background: rgba(139, 125, 107, 0.1);
    color: var(--text-primary);
}

/* Simple button styling to match existing design */
.btn {
    padding: 12px 24px;
    background: transparent;
    border: 1px solid var(--sage-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-secondary);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    font-family: 'Georgia', 'Garamond', serif;
}

.btn:hover {
    background: var(--sage-base);
    border-color: var(--deep-coral);
}

.btn-primary {
    background: var(--deep-coral);
    color: var(--white);
    border-color: var(--deep-coral);
}

.btn-primary:hover {
    background: var(--deep-coral);
}

.btn-sm {
    padding: 8px 16px;
    font-size: 13px;
}

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

.btn-secondary {
    background: var(--sage-base);
    color: var(--text-primary);
    border-color: var(--sage-border);
}

.btn-secondary:hover {
    background: var(--sage-base);
    border-color: var(--sage-border);
}

.btn-danger {
    background: var(--danger-red);
    color: white;
    border-color: var(--danger-red);
}

.btn-danger:hover {
    background: var(--danger-red-hover);
    border-color: var(--danger-red-active);
}

/* Collections grid - clean and minimal */
.collections-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

.collection-card {
    background: var(--white);
    border: 1px solid var(--sage-border);
    border-radius: 16px;
    padding: 28px 24px;
    cursor: pointer;
    position: relative;
    display: block;
    text-decoration: none;
    color: inherit;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.collection-card:hover {
    box-shadow: 0 4px 12px var(--deep-coral-hover-strong);
}

.collection-card:hover .collection-card-actions {
    opacity: 1;
}

.collection-card:focus {
    outline: none;
}

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

.collection-card-info {
    flex: 1;
}

.collection-card-title {
    font-size: 20px;
    font-weight: 500;
    font-style: normal;
    color: var(--text-primary);
    margin: 0 0 6px 0;
    letter-spacing: -0.02em;
    font-family: 'Cinzel', serif;
}

.collection-card-count {
    font-size: 13px;
    color: var(--text-tertiary);
    font-style: normal;
}

.collection-card-actions {
    display: flex;
    gap: 4px;
    opacity: 0;
    transition: opacity 0.2s;
}

.collection-action-btn {
    width: 32px;
    height: 32px;
    background: transparent;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.collection-action-btn:hover {
    background: rgba(139, 125, 107, 0.1);
    color: var(--text-primary);
}

.collection-card-description {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-top: 12px;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.collection-card-compact {
    padding: 16px;
    min-height: 120px;
}

.collection-card-compact .collection-card-title {
    font-size: 14px;
    margin-bottom: 2px;
}

.collection-card-compact .collection-card-count {
    font-size: 11px;
}

.collection-card-compact .collection-card-description {
    font-size: 13px;
    margin-bottom: 0;
    -webkit-line-clamp: 1;
    line-clamp: 1;
}

.collection-card-view-all {
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--sage-base);
    border: 2px dashed var(--sage-border);
}

.collection-card-view-all:hover {
    background: var(--sage-base);
    border-color: var(--sage-border);
}

.view-all-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-secondary);
    font-size: 13px;
}

.view-all-content i {
    font-size: 20px;
}

.collection-card-footer {
    display: flex;
    justify-content: flex-end;
}

/* Collection detail view */
.collection-header {
    margin-bottom: 40px;
    padding-bottom: 24px;
    border-bottom: 1px solid var(--sage-border);
}

.collection-title {
    font-size: 24px;
    font-weight: 400;
    color: var(--text-primary);
    margin: 12px 0 8px 0;
}

.collection-description {
    color: var(--text-primary);
    font-size: 18px;
    line-height: 1.6;
    margin: 0;
    font-style: italic;
}

.collection-recipes {
    margin-top: 20px;
}

.empty-collection {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
    font-style: italic;
    font-size: 14px;
}

/* Recipe detail view */
.recipe-header {
    margin-bottom: 32px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--sage-border);
}

.recipe-container {
    margin-top: 20px;
    display: flex;
    gap: 40px;
    align-items: flex-start;
}

.content-wrapper {
    flex: 1;
    position: relative;
    min-height: 500px;
    min-width: 0; /* Allow flex item to shrink below content size */
}

.menu-actions {
    margin: 20px auto 0;
    max-width: 800px;
    display: flex;
    gap: 8px;
    justify-content: flex-start;
}

.menu-content {
    margin-top: 20px;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
    min-height: 500px;
}

.menu-content .markdown-textarea {
    position: static;
    width: 100%;
    height: 500px;
}

.menu-content .preview-content {
    max-width: 100%;
}

.recipe-metadata {
    width: 200px;
    flex-shrink: 0;
    background: var(--white);
    border: 1px solid var(--sage-border);
    border-radius: 8px;
    padding: 16px;
    position: relative; /* Create positioning context for dropdown */
}

.metadata-section {
    margin-bottom: 20px;
}

.metadata-section:last-child {
    margin-bottom: 0;
}

.metadata-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-secondary);
    margin-bottom: 6px;
    font-weight: 500;
}

.metadata-value {
    font-size: 13px;
    color: var(--text-primary);
    font-family: 'Georgia', serif;
}

.metadata-collections {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.metadata-collection-tag {
    font-size: 13px;
    color: var(--deep-coral);
    background: transparent;
    padding: 0;
    border: none;
    font-family: 'Georgia', serif;
    text-decoration: underline;
    cursor: pointer;
    transition: color 0.2s;
}

.metadata-collection-tag:hover {
    color: var(--text-primary);
}

.metadata-empty {
    font-size: 13px;
    color: var(--text-tertiary);
    font-style: italic;
}

.metadata-actions {
    padding-top: 8px;
    border-top: 1px solid var(--sage-border);
}

.metadata-action-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}

.metadata-action-btn {
    background: transparent;
    border: none;
    border-radius: 6px;
    padding: 6px;
    font-size: 14px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
}

.metadata-action-btn:hover {
    background: var(--deep-coral-hover);
    color: var(--deep-coral);
}

.metadata-action-btn i {
    font-size: 14px;
}

.metadata-action-btn-primary {
    color: var(--deep-coral);
}

.metadata-action-btn-primary:hover {
    background: var(--sage-base);
    color: var(--text-primary);
}

.metadata-action-btn-danger {
    color: var(--error-red);
}

.metadata-action-btn-danger:hover {
    background: rgba(220, 53, 69, 0.1);
    color: var(--error-red);
}

/* Share Dropdown */
.share-dropdown-container {
    position: relative;
    display: inline-block;
}

.share-dropdown {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    background: var(--white);
    border: 1px solid var(--sage-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    width: 200px;
    z-index: 1000;
    overflow: hidden;
}

.share-dropdown-item {
    width: 100%;
    padding: 10px 14px;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 13px;
    font-family: 'Georgia', serif;
    color: var(--text-primary);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    transition: background-color 0.15s ease;
}

.share-dropdown-item:hover {
    background: var(--sage-border);
}

.share-dropdown-item i {
    width: 14px;
    color: var(--text-secondary);
    font-size: 13px;
}

.share-dropdown-divider {
    height: 1px;
    background: var(--sage-border);
    margin: 6px 0;
}

.share-dropdown-label {
    padding: 8px 14px 4px;
    font-size: 11px;
    color: var(--text-secondary);
    font-family: 'Georgia', serif;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

/* Collections Menu (Spotify-style dropdown) */
.collections-menu {
    position: absolute;
    background: var(--white);
    border: 1px solid var(--sage-border);
    border-radius: 8px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    width: 240px;
    max-height: 400px;
    z-index: 1000;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.collections-menu-search {
    padding: 8px;
}

.collections-menu-search input {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid var(--sage-border);
    border-radius: 4px;
    font-size: 13px;
    font-family: 'Georgia', serif;
    background: var(--white);
    color: var(--text-primary);
}

.collections-menu-search input:focus {
    outline: none;
    border-color: var(--sage-border);
}

.collections-menu-new-btn {
    padding: 10px 12px;
    margin: 0 8px;
    background: transparent;
    border: none;
    text-align: left;
    font-size: 13px;
    font-family: 'Georgia', serif;
    color: var(--deep-coral);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    border-radius: 4px;
    transition: background 0.2s;
}

.collections-menu-new-btn:hover {
    background: var(--sage-base);
}

.collections-menu-new-btn i {
    font-size: 12px;
}

.collections-menu-divider {
    height: 1px;
    background: var(--sage-border);
    margin: 8px 0;
}

.collections-menu-content {
    flex: 1;
    overflow-y: auto;
    padding: 4px 8px 8px 8px;
    max-height: 280px;
}

.collection-checkbox {
    display: flex;
    align-items: center;
    padding: 8px 12px;
    margin: 2px 0;
    border-radius: 4px;
    cursor: pointer;
    transition: background 0.2s;
}

.collection-checkbox:hover {
    background: var(--sage-base);
}

.collection-checkbox input[type="checkbox"] {
    margin: 0 12px 0 0;
    cursor: pointer;
    width: 16px;
    height: 16px;
}

.collection-checkbox label {
    font-family: 'Georgia', serif;
    font-size: 14px;
    color: var(--text-primary);
    cursor: pointer;
    flex: 1;
    margin: 0;
}

/* Back button */
.back-btn {
    background: transparent;
    border: 1px solid var(--sage-border);
    border-radius: 8px;
    padding: 10px 16px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-primary);
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 20px;
    font-family: 'Georgia', 'Garamond', serif;
}

.back-btn:hover {
    background: var(--sage-base);
    border-color: var(--sage-border);
}

.back-btn.hidden {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        height: 100vh;
        z-index: 200;
    }
    
    .desktop-sidebar-toggle {
        display: none;
    }
    
    .navbar-toggle-btn {
        display: none;
    }
    
    .mobile-sidebar-toggle {
        display: flex;
    }
    
    .content-area {
        padding: 20px 8px 100px 16px;
    }
    
    .recipe-header {
        margin-bottom: 20px;
    }
    
    .title-display {
        font-size: 18px;
    }
    
    .collections-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .collection-recipes {
        grid-template-columns: 1fr;
    }
    
    .navbar {
        display: flex;
        padding: 0 12px;
        position: sticky;
        top: 0;
        z-index: 100;
    }
    
    .navbar-brand h1 {
        font-size: 13px;
    }
    
    /* Profile hero - keep horizontal but smaller on mobile */
    .profile-hero {
        padding: 0px 16px 24px 16px;
        gap: 20px;
    }
    
    .profile-avatar {
        width: 100px;
        height: 100px;
        min-height: 100px;
    }
    
    .profile-username {
        font-size: 22px;
    }
    
    .profile-stats {
        gap: 12px;
        flex-wrap: wrap;
    }
    
    /* Condensed cards on mobile */
    .recipes-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .collection-card {
        padding: 16px 18px;
    }
    
    .collection-card-title {
        font-size: 17px;
    }
    
    .collection-card-description {
        font-size: 14px;
        margin-top: 8px;
    }
    
    .collection-card-count,
    .collection-card-date {
        font-size: 12px;
    }
    
    .collections-header {
        margin-bottom: 24px;
    }
    
    .recipe-container {
        flex-direction: column;
    }
    
    .content-wrapper {
        max-width: 100%;
    }
    
    .recipe-metadata {
        width: 100%;
        margin-top: 24px;
    }
    
    /* Share dropdown opens upward when metadata is at bottom */
    .recipe-metadata .share-dropdown {
        top: auto;
        bottom: calc(100% + 4px);
    }
}

/* Medium screens - metadata below when sidebar is open */
@media (min-width: 769px) and (max-width: 1200px) {
    .sidebar:not(.collapsed) ~ .main-content .recipe-container {
        flex-direction: column;
    }
    
    .sidebar:not(.collapsed) ~ .main-content .content-wrapper {
        max-width: 100%;
    }
    
    .sidebar:not(.collapsed) ~ .main-content .recipe-metadata {
        width: 100%;
        margin-top: 24px;
    }
    
    /* Share dropdown opens upward when metadata is at bottom */
    .sidebar:not(.collapsed) ~ .main-content .recipe-metadata .share-dropdown {
        top: auto;
        bottom: calc(100% + 4px);
    }
}

/* Auth Pages */
body:has(.auth-container) {
    display: block;
    height: auto;
    overflow: auto;
}

.auth-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--sage-base);
    padding: 24px;
}

.auth-box {
    background: var(--white);
    border: 1px solid var(--sage-border);
    border-radius: 12px;
    padding: 48px 40px;
    max-width: 420px;
    width: 100%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.auth-title {
    font-family: 'Cinzel', serif;
    font-size: 32px;
    font-weight: 600;
    text-align: center;
    color: var(--deep-coral);
    margin-bottom: 8px;
}

.auth-subtitle {
    font-family: 'Georgia', serif;
    font-size: 18px;
    font-weight: normal;
    text-align: center;
    color: var(--text-primary);
    margin-bottom: 32px;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-group label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    letter-spacing: 0.3px;
}

.form-group input {
    padding: 12px 14px;
    border: 1px solid var(--sage-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Georgia', serif;
    color: var(--text-primary);
    background: var(--white);
    transition: all 0.2s;
}

.form-group input:focus {
    outline: none;
    border-color: var(--deep-coral);
    background: var(--white);
}

.error-message {
    display: none;
    padding: 12px 14px;
    background: var(--error-bg);
    border: 1px solid var(--error-border-light);
    border-radius: 8px;
    color: var(--error-red);
    font-size: 13px;
    line-height: 1.4;
}

.auth-btn {
    padding: 14px 20px;
    background: var(--deep-coral);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-family: 'Georgia', serif;
    margin-top: 8px;
}

.auth-btn:hover:not(:disabled) {
    background: var(--deep-coral);
}

.auth-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.auth-btn-google {
    background: white;
    color: var(--text-primary);
    border: 1px solid var(--sage-border);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    margin-top: 12px;
}

.auth-btn-google:hover:not(:disabled) {
    background: var(--sage-base);
    border-color: var(--sage-border);
}

.auth-divider {
    display: flex;
    align-items: center;
    margin: 24px 0 16px;
    color: var(--text-tertiary);
    font-size: 14px;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--sage-border);
}

.auth-divider span {
    padding: 0 16px;
}

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

.auth-footer a {
    color: var(--deep-coral);
    text-decoration: none;
    font-weight: 500;
}

.auth-footer a:hover {
    text-decoration: underline;
}

/* Settings Page */
body:has(.settings-container) {
    display: block;
    height: auto;
    overflow: auto;
}

.settings-container {
    min-height: 100vh;
    background: var(--sage-base);
    padding: 0;
}

.settings-header {
    background: var(--white);
    border-bottom: 1px solid var(--sage-border);
    padding: 24px 32px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.settings-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--deep-coral);
    text-decoration: none;
    font-size: 14px;
    margin-bottom: 16px;
    transition: color 0.2s;
}

.settings-back-btn:hover {
    color: var(--text-primary);
}

.settings-header h1 {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    font-weight: 600;
    color: var(--text-primary);
}

.settings-content {
    max-width: 720px;
    margin: 0 auto;
    padding: 40px 32px 80px;
}

.settings-section {
    background: var(--white);
    border: 1px solid var(--sage-border);
    border-radius: 12px;
    padding: 32px;
    margin-bottom: 24px;
}

.settings-section-title {
    font-family: 'Cinzel', serif;
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--sage-border);
}

.settings-item {
    margin-bottom: 32px;
}

.settings-item:last-child {
    margin-bottom: 0;
}

.settings-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.settings-value {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.settings-help {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 6px;
    line-height: 1.5;
}

.settings-input {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--sage-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Georgia', serif;
    color: var(--text-primary);
    background: var(--white);
    transition: all 0.2s;
    margin-bottom: 12px;
}

.settings-input:focus {
    outline: none;
    border-color: var(--deep-coral);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--deep-coral-hover);
}

.settings-textarea {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid var(--sage-border);
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Georgia', serif;
    color: var(--text-primary);
    background: var(--white);
    transition: all 0.2s;
    margin-bottom: 6px;
    resize: vertical;
    min-height: 80px;
}

.settings-textarea:focus {
    outline: none;
    border-color: var(--deep-coral);
    background: var(--white);
    box-shadow: 0 0 0 3px var(--deep-coral-hover);
}

.settings-btn {
    padding: 10px 18px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    font-family: 'Georgia', serif;
}

.settings-btn-primary {
    background: var(--deep-coral);
    color: var(--white);
}

.settings-btn-primary:hover:not(:disabled) {
    background: var(--deep-coral);
}

.settings-btn-secondary {
    background: var(--white);
    color: var(--deep-coral);
    border: 1px solid var(--deep-coral);
}

.settings-btn-secondary:hover:not(:disabled) {
    background: var(--sage-base);
}

.settings-btn-danger {
    background: var(--error-red);
    color: white;
}

.settings-btn-danger:hover:not(:disabled) {
    background: var(--error-red-darker);
}

.settings-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.settings-toggle-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.settings-toggle-info {
    flex: 1;
}

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

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

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

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

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

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

.settings-danger-zone {
    border-color: var(--error-border);
}

.settings-danger-zone .settings-section-title {
    color: var(--error-red);
}

.success-message {
    display: none;
    padding: 12px 14px;
    background: var(--success-bg);
    border: 1px solid var(--success-border);
    border-radius: 8px;
    color: var(--success-green);
    font-size: 13px;
    line-height: 1.4;
    margin-top: 12px;
}

/* Settings-specific form styling (used within modals) */
.settings-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
    padding: 20px;
}

.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    margin-top: 24px;
}

.settings-btn-danger {
    margin-top: 12px;
}

@media (max-width: 768px) {
    .settings-header {
        padding: 20px;
    }
    
    .settings-content {
        padding: 24px 20px;
    }
    
    .settings-section {
        padding: 24px 20px;
    }
    
    .settings-toggle-container {
        flex-direction: column;
        align-items: flex-start;
    }
    
    .modal-actions {
        flex-direction: column-reverse;
    }
    
    .modal-actions .settings-btn {
        width: 100%;
    }
}

/* EasyMDE Customization */
.EasyMDEContainer {
    background: var(--white);
    border: 2px solid var(--sage-border);
    border-radius: 8px;
    overflow: hidden;
}

.EasyMDEContainer .CodeMirror {
    font-family: 'Georgia', serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    background: var(--white);
    border: none;
    padding: 40px;
    height: auto;
    min-height: 500px;
}

.EasyMDEContainer .CodeMirror-scroll {
    min-height: 500px;
}

.EasyMDEContainer .editor-toolbar {
    background: var(--sage-base);
    border: none;
    border-bottom: 1px solid var(--sage-border);
    padding: 8px;
}

.EasyMDEContainer .editor-toolbar button {
    color: var(--deep-coral);
    border: none;
    background: transparent;
}

.EasyMDEContainer .editor-toolbar button:hover,
.EasyMDEContainer .editor-toolbar button.active {
    background: var(--sage-border);
    border-color: var(--sage-border);
}

.EasyMDEContainer .editor-toolbar i.separator {
    border-left-color: var(--text-tertiary);
    border-right-color: var(--sage-base);
}

.EasyMDEContainer .editor-preview {
    font-family: 'Georgia', serif;
    font-size: 15px;
    line-height: 1.7;
    color: var(--text-primary);
    padding: 40px;
    background: var(--white);
}

/* Style markdown syntax in editor to match preview */
.EasyMDEContainer .cm-header-1 {
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

.EasyMDEContainer .cm-header-2 {
    font-size: 18px;
    font-weight: 600;
    line-height: 1.3;
    color: var(--text-primary);
}

.EasyMDEContainer .cm-header-3 {
    font-size: 16px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-primary);
}

.EasyMDEContainer .cm-strong {
    font-weight: 600;
    color: var(--text-primary);
}

.EasyMDEContainer .cm-em {
    font-style: italic;
}

.EasyMDEContainer .cm-link {
    color: var(--deep-coral);
    text-decoration: underline;
}

.EasyMDEContainer .cm-url {
    color: var(--text-secondary);
}

.EasyMDEContainer .cm-quote {
    color: var(--text-primary);
    font-style: italic;
}

.EasyMDEContainer .CodeMirror-cursor {
    border-left-color: var(--deep-coral);
}

.EasyMDEContainer .CodeMirror-selected {
    background: rgba(184, 86, 61, 0.1);
}

.EasyMDEContainer .CodeMirror-focused .CodeMirror-selected {
    background: rgba(184, 86, 61, 0.15);
}

/* Hide the original textarea when EasyMDE is active */
.EasyMDEContainer + textarea {
    display: none !important;
}

/* Activity Feed Styles */
.feed-header {
    padding: 0 0 20px 0;
    border-bottom: 1px solid var(--sage-border);
    margin-bottom: 24px;
}

.feed-header h2 {
    font-family: 'Cinzel', serif;
    font-size: 28px;
    font-weight: 400;
    color: var(--text-primary);
    margin: 0;
}

.feed-container {
    max-width: 700px;
}

.feed-item {
    padding: 0;
    border-bottom: 1px solid var(--sage-border);
    display: flex;
    gap: 12px;
    align-items: flex-start;
    transition: background-color 0.2s ease;
}

/* Mobile-first spacing for better readability */
@media (max-width: 768px) {
    .feed-item {
        padding: 0;
        gap: 12px;
    }
}

.feed-item:hover {
    background-color: var(--white);
}

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

.feed-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    background: var(--sage-base);
    object-fit: cover;
}

.sidebar-avatar,
.user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.viewing-user {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

#viewingUserAvatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    flex-shrink: 0;
}

#viewingUsername {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
}

#viewingUsername.skeleton-text {
    height: 16px;
    width: 80px;
    display: inline-block;
}

.follow-section {
    padding: 12px 16px;
}

#followBtn {
    width: 100%;
    margin-bottom: 8px;
}

.follow-stats {
    display: flex;
    gap: 16px;
    font-size: 13px;
    color: var(--text-secondary);
}

#navSearchBtn {
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    padding: 8px 12px;
    transition: opacity 0.2s;
    display: none; /* Shown by JS when logged in */
}

#navSearchBtn:hover {
    opacity: 0.7;
}

#navMenuBtnWrapper {
    position: relative;
    display: none; /* Shown by JS when logged in */
}

#navSignInBtn {
    text-decoration: none;
    display: none; /* Shown by JS when logged out */
}

#dropdownUserAvatar {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    margin-right: 8px;
}

.feed-empty {
    padding: 40px 20px;
    color: var(--text-tertiary);
}


.feed-empty-main {
    text-align: center;
    padding: 40px 20px;
}

.feed-empty-main > div:first-child {
    font-size: 48px;
    margin-bottom: 20px;
}

.feed-empty h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.feed-empty p {
    font-size: 16px;
    margin-bottom: 24px;
    color: var(--text-tertiary);
}

.feed-empty-cta {
    background: var(--deep-coral);
    color: var(--white);
    border: none;
    padding: 12px 32px;
    border-radius: 6px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s ease;
}

.feed-empty-cta:hover {
    background: var(--deep-coral);
}

.user-not-found {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-tertiary);
}

.user-not-found > div:first-child {
    font-size: 72px;
    margin-bottom: 20px;
}

.user-not-found h2 {
    font-size: 24px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.user-not-found p {
    font-size: 16px;
    margin-bottom: 30px;
}

.user-not-found a {
    color: var(--deep-coral);
    text-decoration: underline;
}

.collections-menu {
    display: none;
}

#menuDescriptionInput {
    margin-bottom: 12px;
    width: 100%;
    padding: 8px;
    border: 1px solid var(--sage-border);
    border-radius: 4px;
    font-size: 13px;
}

.description-display {
    margin-bottom: 12px;
    font-size: 13px;
    color: var(--text-secondary);
}

#debugModal .modal-content {
    max-width: 800px;
    max-height: 80vh;
    overflow: auto;
}

#debugContent {
    font-family: monospace;
    font-size: 12px;
    white-space: pre-wrap;
    background: var(--sage-base);
    padding: 15px;
    border-radius: 4px;
    max-height: 60vh;
    overflow-y: auto;
}

#shortcutsModal .modal-content {
    max-width: 600px;
}

.feed-content {
    flex: 1;
    min-width: 0;
}

.feed-header-text {
    font-size: 15px;
    line-height: 1.4;
    color: var(--text-primary);
    margin-bottom: 8px;
}

/* Larger text on mobile for better readability */
@media (max-width: 768px) {
    .feed-header-text {
        font-size: 16px;
        line-height: 1.4;
    }
}

.feed-username {
    font-weight: 600;
    color: var(--deep-coral);
    text-decoration: none;
}

.feed-username:hover {
    text-decoration: underline;
}

/* Admin Badge */
.admin-badge {
    display: inline-block;
    color: var(--deep-coral);
    font-size: 0.85em;
    margin-left: 4px;
    opacity: 0.8;
    vertical-align: baseline;
    position: relative;
    top: -0.05em;
    cursor: help;
    transition: opacity 0.2s ease;
}

.admin-badge:hover {
    opacity: 1;
}

.feed-action {
    color: var(--text-secondary);
}

.feed-entity-title {
    font-weight: 500;
    color: var(--text-primary);
    text-decoration: none;
    cursor: pointer;
}

.feed-entity-title:hover {
    color: var(--deep-coral);
    text-decoration: underline;
}

.feed-preview {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.4;
    margin-top: 4px;
    margin-bottom: 8px;
}

/* Improved preview text on mobile */
@media (max-width: 768px) {
    .feed-preview {
        font-size: 15px;
        line-height: 1.4;
        margin-bottom: 8px;
    }
}

.feed-timestamp {
    font-size: 13px;
    color: var(--text-tertiary);
    margin-top: 8px;
}

/* Better timestamp spacing on mobile */
@media (max-width: 768px) {
    .feed-timestamp {
        font-size: 14px;
        margin-top: 8px;
    }
}

.feed-empty {
    padding: 80px 20px;
    text-align: center;
}

.follow-btn {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    background: var(--deep-coral);
    color: var(--white);
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: inherit;
}

.follow-btn:hover {
    background: var(--deep-coral);
}

.follow-btn.following {
    background: var(--white);
    color: var(--deep-coral);
    border: 2px solid var(--deep-coral);
}

.follow-btn.following:hover {
    background: var(--sage-base);
}

.follow-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Search Page */
.search-page-container {
    max-width: 680px;
    margin: 0 auto;
    padding: 48px 32px;
}

.page-title {
    font-size: 16px;
    font-weight: normal;
    font-style: italic;
    color: var(--text-primary);
    margin: 0 0 32px 0;
    font-family: Georgia, 'Times New Roman', serif;
}

.search-input-wrapper {
    margin-bottom: 32px;
}

#searchUsersInput {
    width: 100%;
    padding: 12px 16px;
    font-size: 15px;
    border: 1px solid var(--sage-border);
    border-radius: 4px;
    font-family: Georgia, 'Times New Roman', serif;
    background: var(--white);
    color: var(--text-primary);
    transition: border-color 0.2s ease;
}

#searchUsersInput:focus {
    outline: none;
    border-color: var(--deep-coral);
}

#searchUsersInput::placeholder {
    color: var(--text-tertiary);
    font-style: italic;
}

.search-results {
    margin-top: 0;
}

.search-result-item {
    display: flex;
    align-items: center;
    padding: 12px 16px;
    border-bottom: 1px solid var(--sage-border);
    cursor: pointer;
    transition: background-color 0.15s ease;
    gap: 12px;
    text-decoration: none;
    color: inherit;
}

.search-result-item:hover {
    background-color: var(--white);
}

.search-result-item:first-child {
    padding-top: 12px;
}

.search-result-item:last-child {
    border-bottom: none;
    padding-bottom: 12px;
}

.search-result-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    flex-shrink: 0;
    object-fit: cover;
}

.search-result-info {
    flex: 1;
    min-width: 0;
}

.search-result-username {
    font-weight: normal;
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 3px;
    font-family: Georgia, 'Times New Roman', serif;
}

.search-result-stats {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.search-result-follow-btn {
    padding: 6px 16px;
    font-size: 13px;
    background: var(--deep-coral);
    border: 1px solid var(--deep-coral);
    border-radius: 4px;
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    white-space: nowrap;
    flex-shrink: 0;
    min-width: 90px;
    text-align: center;
}

.search-result-follow-btn:hover {
    background: var(--deep-coral);
    border-color: var(--deep-coral);
}

.search-result-follow-btn.following {
    background: transparent;
    color: var(--deep-coral);
    border-color: var(--sage-border);
}

.search-result-follow-btn.following:hover {
    background: var(--sage-base);
    border-color: var(--deep-coral);
}

.search-results-empty {
    text-align: center;
    padding: 80px 20px;
    color: var(--text-tertiary);
}

.search-results-empty > div:first-child {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.3;
}

.search-results-empty h3 {
    font-size: 15px;
    font-weight: normal;
    font-style: italic;
    color: var(--text-tertiary);
    margin: 0;
    font-family: Georgia, 'Times New Roman', serif;
}

@media (max-width: 768px) {
    .search-page-container {
        padding: 24px 16px;
    }
    
    .page-title {
        margin-bottom: 20px;
        font-size: 15px;
    }
    
    .search-input-wrapper {
        margin-bottom: 20px;
    }
    
    #searchUsersInput {
        padding: 10px 14px;
        font-size: 16px; /* Prevents iOS zoom on focus */
    }
    
    .search-result-item {
        padding: 14px 12px;
        gap: 12px;
    }
    
    .search-result-avatar {
        width: 44px;
        height: 44px;
    }
    
    .search-result-username {
        font-size: 15px;
    }
    
    .search-result-stats {
        font-size: 12px;
    }
    
    .search-result-follow-btn {
        padding: 7px 12px;
        font-size: 13px;
        min-width: 80px;
    }
}

@media (max-width: 480px) {
    .search-page-container {
        padding: 16px 12px;
    }
    
    .page-title {
        font-size: 14px;
        margin-bottom: 16px;
    }
    
    .search-input-wrapper {
        margin-bottom: 16px;
    }
    
    .search-result-item {
        padding: 12px 8px;
        gap: 10px;
    }
    
    .search-result-avatar {
        width: 40px;
        height: 40px;
    }
    
    .search-result-username {
        font-size: 14px;
        margin-bottom: 2px;
    }
    
    .search-result-stats {
        font-size: 11px;
    }
    
    .search-result-follow-btn {
        padding: 6px 10px;
        font-size: 12px;
        min-width: 72px;
    }
    
    .auth-box {
        padding: 32px 24px;
    }
    
    .auth-title {
        font-size: 28px;
    }
}

/* Mobile Bottom Navigation */
.mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 64px;
    background: var(--white);
    border-top: 1px solid var(--sage-border);
    z-index: 300;
    padding: 0 8px;
    justify-content: space-around;
    align-items: center;
    /* Add safe area padding for iPhone home indicator */
    padding-bottom: max(8px, env(safe-area-inset-bottom));
    height: calc(64px + env(safe-area-inset-bottom));
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 8px 12px;
    color: var(--warm-brown);
    text-decoration: none;
    font-size: 11px;
    transition: color 0.2s;
    flex: 1;
    min-width: 0;
}

.bottom-nav-item:hover,
.bottom-nav-item:focus {
    color: var(--deep-coral);
    outline: none;
}

.bottom-nav-item.active {
    color: var(--deep-coral);
}

.bottom-nav-item i {
    font-size: 20px;
}

.bottom-nav-item span {
    font-size: 10px;
    font-weight: 500;
}

@media (max-width: 768px) {
    .mobile-bottom-nav {
        display: flex;
    }

    .desktop-sidebar-toggle {
        display: none;
    }
    
    /* Add padding to content to account for bottom nav */
    .main-content {
        padding-bottom: 0;
    }
    
    /* Content area defaults to full height on mobile */
    .content-area {
        height: 100vh;
        max-height: 100vh;
        overflow-y: auto;
        padding-bottom: 24px;
    }
    
    /* Adjust height when mobile nav is visible */
    body.mobile-nav-visible .content-area {
        height: calc(100vh - 64px - env(safe-area-inset-bottom));
        max-height: calc(100vh - 64px - env(safe-area-inset-bottom));
    }
}