/* Secret Sauce - Family Recipe App */
:root {
    --primary: #D35400;
    --primary-dark: #A04000;
    --secondary: #2C3E50;
    --accent: #E74C3C;
    --warm-bg: #FDF6E3;
    --card-bg: #FFFFFF;
    --text-dark: #2C3E50;
    --text-light: #7F8C8D;
    --border: #E8E0D5;
    --shadow: 0 2px 12px rgba(0,0,0,0.08);
    --shadow-hover: 0 4px 20px rgba(0,0,0,0.12);
}

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

body {
    font-family: 'Inter', -apple-system, sans-serif;
    background: var(--warm-bg);
    color: var(--text-dark);
    min-height: 100vh;
}

/* Screens */
.screen {
    display: none;
}

.screen.active {
    display: block;
}

/* Login Screen */
.login-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 2rem;
    background: linear-gradient(135deg, #FDF6E3 0%, #F5E6D3 100%);
}

.logo {
    text-align: center;
    margin-bottom: 2rem;
}

.logo-icon {
    font-size: 4rem;
    display: block;
    margin-bottom: 0.5rem;
}

.logo h1 {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

/* Logo text styling - matches app icon */
.logo-text {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    margin-bottom: 0.5rem;
}

.logo-family {
    font-size: 2.5rem;
    font-weight: 700;
    color: #C54B00;
    position: relative;
    display: inline-block;
}

.logo-family::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    right: 0;
    height: 4px;
    background: #C54B00;
}

.logo-kitchen {
    font-size: 2.3rem;
    font-weight: 400;
    color: #9A4A1C;
    margin-top: 8px;
}

.tagline {
    font-size: 1rem;
    color: var(--text-light);
    font-style: italic;
}

#login-form {
    width: 100%;
    max-width: 320px;
    background: var(--card-bg);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow);
}

.form-group {
    margin-bottom: 1.25rem;
}

.form-group label {
    display: block;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 1rem;
    border: 2px solid var(--border);
    border-radius: 8px;
    transition: border-color 0.2s;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

.btn-primary {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

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

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    padding: 0.75rem 1.25rem;
    background: var(--warm-bg);
    color: var(--text-dark);
    font-size: 0.9rem;
    font-weight: 500;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

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

.family-note {
    margin-top: 2rem;
    font-size: 0.875rem;
    color: var(--text-light);
}

/* App Header */
.app-header {
    position: sticky;
    top: 0;
    background: var(--card-bg);
    padding: 0.75rem 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--border);
    z-index: 100;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-small {
    font-size: 1.5rem;
}

.header-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: #C54B00;
}

.header-center {
    order: 3;
    width: 100%;
}

@media (min-width: 600px) {
    .header-center {
        order: 0;
        width: auto;
    }
}

.header-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

/* Kitchen Switcher */
.kitchen-switcher {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem;
    background: var(--warm-bg);
    border-radius: 8px;
    overflow-x: auto;
}

.kitchen-btn {
    padding: 0.4rem 0.75rem;
    background: transparent;
    border: none;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-light);
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.kitchen-btn:hover {
    color: var(--text-dark);
}

.kitchen-btn.active {
    background: var(--card-bg);
    color: var(--primary);
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.btn-add {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    font-size: 0.875rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-add:hover {
    background: var(--primary-dark);
}

.user-avatar {
    width: 36px;
    height: 36px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
}

/* Navigation */
.app-nav {
    background: var(--card-bg);
    padding: 0.75rem 1rem;
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
}

.nav-btn {
    padding: 0.5rem 1rem;
    background: transparent;
    border: none;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-light);
    border-radius: 20px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s;
}

.nav-btn:hover {
    background: var(--warm-bg);
    color: var(--text-dark);
}

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

/* Main Content */
.app-main {
    padding: 1.5rem;
    max-width: 900px;
    margin: 0 auto;
}

.view {
    display: none;
}

.view.active {
    display: block;
}

.view-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.view-subtitle {
    color: var(--text-light);
    font-size: 0.9rem;
    margin-bottom: 1.5rem;
}

/* Recipe Grid */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.25rem;
}

/* Recipe Card */
.recipe-card {
    background: var(--card-bg);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-hover);
}

.recipe-image {
    width: 100%;
    height: 160px;
    background: linear-gradient(135deg, #F5E6D3 0%, #E8D5C4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
    position: relative;
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-video-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: rgba(0,0,0,0.7);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
}

.recipe-card-content {
    padding: 1rem;
}

.recipe-card-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.recipe-card-from {
    font-size: 0.875rem;
    color: var(--primary);
    margin-bottom: 0.5rem;
}

.recipe-card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-light);
}

.recipe-card-likes {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

/* Recipe Detail */
.btn-back {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    padding: 0;
    margin-bottom: 1rem;
}

.recipe-detail {
    background: var(--card-bg);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.recipe-detail-image {
    width: 100%;
    height: 200px;
    background: linear-gradient(135deg, #F5E6D3 0%, #E8D5C4 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    position: relative;
}

.recipe-detail-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.recipe-detail-content {
    padding: 1.5rem;
}

.recipe-detail-header {
    margin-bottom: 1rem;
}

.recipe-detail-title {
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.recipe-detail-from {
    font-size: 1rem;
    color: var(--primary);
    font-weight: 500;
}

.recipe-story {
    font-style: italic;
    color: var(--text-light);
    padding: 1rem;
    background: var(--warm-bg);
    border-radius: 8px;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--primary);
}

/* Video Tips Section */
.video-tips-section {
    margin-bottom: 1.5rem;
    padding: 1rem;
    background: #FFF9F0;
    border-radius: 12px;
    border: 2px solid var(--border);
}

.video-tips-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.video-tip-card {
    background: var(--card-bg);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 0.75rem;
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.video-tip-card:last-child {
    margin-bottom: 0;
}

.video-tip-thumbnail {
    position: relative;
    height: 120px;
    background: #333;
    display: flex;
    align-items: center;
    justify-content: center;
}

.video-tip-thumbnail video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.video-tip-play {
    position: absolute;
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    cursor: pointer;
}

.video-tip-info {
    padding: 0.75rem;
}

.video-tip-title {
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-dark);
}

.video-tip-duration {
    font-size: 0.75rem;
    color: var(--text-light);
}

.recipe-section {
    margin-bottom: 1.5rem;
}

.recipe-section h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.recipe-section ul {
    list-style: none;
}

.recipe-section ul li {
    padding: 0.5rem 0;
    padding-left: 1.5rem;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.recipe-section ul li:last-child {
    border-bottom: none;
}

.recipe-section ul li::before {
    content: "•";
    color: var(--primary);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.recipe-section ol {
    list-style: none;
    counter-reset: steps;
}

.recipe-section ol li {
    padding: 0.75rem 0;
    padding-left: 2rem;
    position: relative;
    counter-increment: steps;
    border-bottom: 1px solid var(--border);
}

.recipe-section ol li:last-child {
    border-bottom: none;
}

.recipe-section ol li::before {
    content: counter(steps);
    position: absolute;
    left: 0;
    width: 1.5rem;
    height: 1.5rem;
    background: var(--primary);
    color: white;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.recipe-actions {
    display: flex;
    gap: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.action-btn {
    flex: 1;
    padding: 0.75rem;
    background: var(--warm-bg);
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
}

.action-btn:hover {
    background: var(--border);
}

.action-btn.liked {
    background: #FDEDEC;
    color: var(--accent);
}

/* Family Grid */
.family-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 1rem;
}

.family-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s;
}

.family-card:hover {
    transform: translateY(-2px);
}

.family-avatar {
    width: 64px;
    height: 64px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 auto 0.75rem;
}

.family-name {
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.family-recipes {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Kitchens Grid */
.kitchens-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.kitchen-card {
    background: var(--card-bg);
    border-radius: 12px;
    padding: 1.5rem;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: transform 0.2s;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.kitchen-card:hover {
    transform: translateY(-2px);
}

.kitchen-card.active {
    border: 2px solid var(--primary);
}

.kitchen-icon {
    font-size: 2.5rem;
}

.kitchen-info {
    flex: 1;
}

.kitchen-name {
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 600;
    font-size: 1.125rem;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.kitchen-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

/* Recipe Form */
.recipe-form {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow);
}

/* Upload Area */
.upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--warm-bg);
}

.upload-area:hover {
    border-color: var(--primary);
    background: #FFF9F0;
}

.upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
}

.upload-icon {
    font-size: 2rem;
}

.upload-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

/* Video Tips List */
.video-tips-list {
    margin-bottom: 1rem;
}

.video-tip-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem;
    background: var(--warm-bg);
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.video-tip-item video {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 4px;
}

.video-tip-item input {
    flex: 1;
    padding: 0.5rem;
    border: 1px solid var(--border);
    border-radius: 4px;
}

.video-tip-remove {
    background: none;
    border: none;
    color: var(--accent);
    cursor: pointer;
    font-size: 1.25rem;
}

.add-video-tip {
    text-align: center;
}

/* Comments Section */
.comments-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.comments-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.comment {
    display: flex;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.comment-avatar {
    width: 32px;
    height: 32px;
    background: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 600;
    flex-shrink: 0;
}

.comment-content {
    background: var(--warm-bg);
    padding: 0.75rem 1rem;
    border-radius: 12px;
    flex: 1;
}

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

.comment-author {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-dark);
}

.comment-delete {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 1.25rem;
    line-height: 1;
    cursor: pointer;
    padding: 0 0.25rem;
    opacity: 0.5;
    transition: opacity 0.2s, color 0.2s;
}

.comment-delete:hover {
    opacity: 1;
    color: var(--accent);
}

.comment-text {
    font-size: 0.875rem;
    color: var(--text-dark);
    margin-top: 0.25rem;
}

.comment-time {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.25rem;
}

/* Video Tips Section */
.video-tips-section {
    margin: 1.5rem 0;
    padding: 1rem;
    background: var(--warm-bg);
    border-radius: 12px;
}

.video-tips-section h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1rem;
    font-size: 1rem;
}

.video-tips-section.empty {
    background: transparent;
    padding: 0;
    margin: 1rem 0;
    text-align: center;
}

.video-tips-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.video-tip-card {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--card-bg);
    border-radius: 8px;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
}

.video-tip-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}

.video-tip-thumbnail {
    width: 60px;
    height: 60px;
    background: var(--secondary);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.video-tip-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

.video-tip-play {
    color: white;
}

.video-tip-play svg {
    width: 24px;
    height: 24px;
}

.video-tip-info {
    flex: 1;
    min-width: 0;
}

.video-tip-title {
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 0.25rem;
}

.video-tip-author {
    font-size: 0.75rem;
    color: var(--text-light);
}

.btn-add-tip {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.75rem 1.25rem;
    background: var(--card-bg);
    border: 2px dashed var(--border);
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-add-tip:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.btn-add-tip svg {
    width: 18px;
    height: 18px;
}

.video-upload-btns {
    margin-bottom: 0.75rem;
}

.video-upload-btns .btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

#video-tip-preview {
    margin-top: 0.75rem;
}

#video-tip-preview video {
    width: 100%;
    max-height: 200px;
    border-radius: 8px;
    background: #000;
}

/* Video Player Modal */
.video-player {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    justify-content: center;
    align-items: center;
}

.video-player.active {
    display: flex;
}

.video-player-backdrop {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.95);
}

.video-player-content {
    position: relative;
    width: 100%;
    max-width: 800px;
    margin: auto;
    padding: 60px 20px 20px;
    z-index: 1;
}

.video-player-close {
    position: fixed;
    top: 20px;
    right: 20px;
    background: white;
    border: none;
    color: #333;
    font-size: 1.5rem;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 10002;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
}

.video-player-close:hover {
    background: #f0f0f0;
}

.video-player-close:active {
    transform: scale(0.95);
}

.video-player video {
    width: 100%;
    max-height: 80vh;
    border-radius: 8px;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-light);
}

.empty-state-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

/* Responsive */
@media (max-width: 480px) {
    .recipe-grid {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        padding: 0.75rem 1rem;
    }
    
    .btn-add {
        padding: 0.4rem 0.75rem;
        font-size: 0.8rem;
    }
    
    .kitchen-switcher {
        justify-content: center;
    }
}

/* Made It Section */
.made-it-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
}

.made-it-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1rem;
}

.made-it-gallery {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-bottom: 1rem;
}

.made-it-card {
    background: var(--warm-bg);
    border-radius: 12px;
    padding: 1rem;
}

.made-it-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
}

.made-it-image,
.made-it-video {
    width: 100%;
    max-height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 0.5rem;
}

.made-it-text {
    font-size: 0.9rem;
    color: var(--text-dark);
    margin: 0;
}

.empty-gallery {
    color: var(--text-light);
    font-style: italic;
    text-align: center;
    padding: 1rem;
}

/* Made It Form */
.made-it-form {
    background: var(--card-bg);
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 1rem;
    margin-top: 1rem;
}

.made-it-form h4 {
    margin: 0 0 1rem 0;
    color: var(--primary);
}

.made-it-uploads {
    margin: 1rem 0;
}

.upload-btn-group {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.made-it-preview {
    margin-top: 0.5rem;
}

.made-it-preview .upload-preview {
    max-width: 100%;
    max-height: 200px;
    border-radius: 8px;
}

.made-it-form-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    align-items: center;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.made-it-form-actions button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.made-it-form-actions .btn-primary {
    width: auto;
    background: var(--primary);
    color: white;
    border: none;
}

.made-it-form-actions .btn-primary:hover {
    background: var(--primary-dark);
}

.made-it-form-actions .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.made-it-form-actions .btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--border);
}

.made-it-form-actions .btn-secondary:hover {
    background: var(--warm-bg);
    color: var(--text-dark);
}

/* Add Comment Form */
.add-comment-form {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.add-comment-form input {
    flex: 1;
    padding: 0.5rem 1rem;
    border: 2px solid var(--border);
    border-radius: 20px;
    font-size: 0.9rem;
}

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

.add-comment-form button {
    padding: 0.5rem 1rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 20px;
    font-weight: 500;
    cursor: pointer;
}

.add-comment-form button:hover {
    background: var(--primary-dark);
}

/* Google Sign In Button */
.google-sign-in {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: white;
    color: #333;
    font-size: 1rem;
    font-weight: 500;
    border: 2px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.google-sign-in:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow);
}

.google-sign-in img {
    width: 20px;
    height: 20px;
}

/* User Menu */
.user-menu {
    position: relative;
    cursor: pointer;
}

.user-avatar-img {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
}

.user-avatar-fallback {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 1rem;
}

.user-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: var(--shadow-hover);
    padding: 0.5rem;
    min-width: 150px;
    z-index: 200;
}

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

.user-dropdown-name {
    padding: 0.5rem;
    font-weight: 500;
    color: var(--text-dark);
}

.user-dropdown hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 0.25rem 0;
}

.user-dropdown button {
    width: 100%;
    padding: 0.5rem;
    background: none;
    border: none;
    text-align: left;
    cursor: pointer;
    border-radius: 4px;
    color: var(--text-dark);
}

.user-dropdown button:hover {
    background: var(--warm-bg);
}

/* Modal */
.modal {
    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: 1000;
    padding: 1rem;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.5rem;
    width: 100%;
    max-width: 400px;
}

.modal-content h3 {
    margin: 0 0 1rem 0;
    font-family: 'Playfair Display', Georgia, serif;
}

.modal-actions {
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
    margin-top: 1rem;
}

.modal-actions.stacked {
    flex-direction: column;
    gap: 12px;
}

.modal-actions.stacked button {
    width: 100%;
}

/* Kitchen Card ID */
.kitchen-id {
    font-size: 0.7rem;
    color: var(--text-light);
    font-family: monospace;
    margin-top: 0.25rem;
}

/* Kitchen Actions */
.kitchen-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

/* Family Avatar Image */
.family-avatar-img {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 0.75rem;
}

/* No Kitchens Message */
.no-kitchens {
    font-size: 0.8rem;
    color: var(--text-light);
    font-style: italic;
}

/* Recipe Made Badge */
.recipe-made-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    background: var(--primary);
    color: white;
    padding: 4px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
}

/* Share Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(44, 62, 80, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.share-modal {
    background: var(--card-bg);
    border-radius: 20px;
    max-width: 400px;
    width: 100%;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.share-modal-header {
    background: var(--primary);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.share-modal-header h2 {
    margin: 0;
    font-size: 22px;
    font-family: 'Playfair Display', Georgia, serif;
}

.modal-close {
    background: rgba(255,255,255,0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    background: rgba(255,255,255,0.3);
}

.share-modal-content {
    padding: 24px;
    background: var(--warm-bg);
}

.share-modal-content > p {
    color: var(--text-light);
    margin-bottom: 20px;
    text-align: center;
    font-family: 'Inter', -apple-system, sans-serif;
}

.invite-code-display,
.invite-password-display {
    background: var(--card-bg);
    border: 2px dashed var(--primary);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    margin-bottom: 12px;
}

.invite-code-label {
    display: block;
    font-size: 12px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
    font-family: 'Inter', -apple-system, sans-serif;
}

.invite-code-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 4px;
    font-family: 'SF Mono', Monaco, monospace;
}

.invite-password-display .invite-code-value {
    font-size: 20px;
    letter-spacing: 2px;
}

.share-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 20px;
}

.share-btn {
    padding: 14px 16px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Inter', -apple-system, sans-serif;
}

.share-btn:hover {
    transform: translateY(-2px);
}

.copy-btn {
    background: var(--card-bg);
    color: var(--text-dark);
    border: 2px solid var(--border);
}

.copy-btn:hover {
    border-color: var(--primary);
    box-shadow: 0 4px 12px rgba(211, 84, 0, 0.15);
}

.text-btn {
    background: var(--primary);
    color: white;
}

.text-btn:hover {
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(211, 84, 0, 0.3);
}

.share-done-btn {
    width: 100%;
    margin-top: 16px;
    padding: 14px;
    background: var(--secondary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', -apple-system, sans-serif;
    transition: background 0.2s;
}

.share-done-btn:hover {
    background: #1a252f;
}

/* Kitchen Cards with Share */
.kitchen-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.kitchen-main {
    display: flex;
    align-items: center;
    gap: 16px;
    cursor: pointer;
}

.kitchen-share-btn {
    width: 100%;
    padding: 10px 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: 'Inter', -apple-system, sans-serif;
}

.kitchen-share-btn:hover {
    transform: translateY(-1px);
    background: var(--primary-dark);
    box-shadow: 0 4px 12px rgba(211, 84, 0, 0.3);
}

/* Kitchen Actions */
.kitchen-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 100%;
    margin-top: 12px;
}

.kitchen-actions .kitchen-share-btn,
.kitchen-actions .kitchen-delete-btn {
    width: 100%;
    justify-content: center;
}

.kitchen-delete-btn {
    padding: 10px 14px;
    background: var(--card-bg);
    color: var(--text-light);
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.kitchen-delete-btn:hover {
    border-color: #E74C3C;
    color: #E74C3C;
    background: #FEE2E2;
}

/* Recipe Edit Actions */
.recipe-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
}

.recipe-edit-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
}

.icon-btn {
    width: 36px;
    height: 36px;
    border: 2px solid var(--border);
    background: var(--card-bg);
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.icon-btn:hover {
    border-color: var(--primary);
    background: var(--warm-bg);
}

.icon-btn.danger:hover {
    border-color: #E74C3C;
    background: #FEE2E2;
}

/* Edit Modal */
.edit-modal {
    background: var(--card-bg);
    border-radius: 20px;
    max-width: 500px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.3);
}

.edit-modal .form-group {
    margin-bottom: 16px;
}

.edit-modal textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', -apple-system, sans-serif;
    resize: vertical;
}

.edit-modal textarea:focus {
    outline: none;
    border-color: var(--primary);
}

.edit-modal input {
    width: 100%;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 14px;
    font-family: 'Inter', -apple-system, sans-serif;
}

.edit-modal input:focus {
    outline: none;
    border-color: var(--primary);
}

.edit-form-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-top: 20px;
}

.edit-form-actions button {
    width: 100%;
    padding: 14px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', -apple-system, sans-serif;
}

.btn-secondary {
    background: var(--card-bg);
    border: 2px solid var(--border);
    color: var(--text-dark);
}

.btn-secondary:hover {
    border-color: var(--primary);
}

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

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

/* ============================================
   CUSTOM SVG ICONS
   ============================================ */

.nav-icon,
.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
}

.nav-icon svg,
.btn-icon svg {
    width: 18px;
    height: 18px;
    stroke: currentColor;
    stroke-width: 2;
}

.nav-btn.active .nav-icon svg {
    stroke: white;
    fill: none;
}

.nav-btn.active .nav-icon svg[data-filled="true"] {
    fill: white;
}

.upload-icon svg {
    width: 32px;
    height: 32px;
    stroke: var(--text-light);
}

.icon-btn svg {
    width: 18px;
    height: 18px;
}

.recipe-video-badge svg,
.recipe-card-likes svg {
    width: 14px;
    height: 14px;
    vertical-align: middle;
    margin-right: 2px;
}

/* Icon colors */
.icon-heart-filled svg {
    fill: var(--accent);
    stroke: var(--accent);
}

.icon-heart-outline svg {
    fill: none;
    stroke: currentColor;
}

/* Recipe action buttons with icons */
.recipe-action-btn svg {
    width: 18px;
    height: 18px;
    margin-right: 6px;
    vertical-align: middle;
}

.recipe-action-btn.liked svg {
    fill: var(--accent);
    stroke: var(--accent);
}

/* Section headers with icons */
.section-header svg {
    width: 20px;
    height: 20px;
    margin-right: 8px;
    vertical-align: middle;
    color: var(--primary);
}

/* Empty state icons */
.empty-state-icon svg {
    width: 48px;
    height: 48px;
    stroke: var(--text-light);
    opacity: 0.5;
}

/* ============================================
   INVITE CARD - Modern Design
   ============================================ */

.invite-card {
    background: linear-gradient(145deg, #FFFFFF 0%, #FDF6E3 100%);
    border-radius: 24px;
    padding: 32px 28px;
    max-width: 340px;
    width: 90%;
    position: relative;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    text-align: center;
    animation: slideUp 0.3s ease-out;
}

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

.invite-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 32px;
    height: 32px;
    border: none;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(45deg);
    transition: all 0.2s;
}

.invite-close:hover {
    background: rgba(0, 0, 0, 0.1);
}

.invite-close svg {
    width: 16px;
    height: 16px;
    stroke: var(--text-light);
}

.invite-header {
    margin-bottom: 28px;
}

.invite-kitchen-icon {
    font-size: 48px;
    margin-bottom: 12px;
    filter: drop-shadow(0 4px 8px rgba(0, 0, 0, 0.1));
}

.invite-kitchen-name {
    font-family: 'Playfair Display', serif;
    font-size: 24px;
    font-weight: 700;
    color: var(--text-dark);
    margin: 0 0 6px;
}

.invite-subtitle {
    font-size: 14px;
    color: var(--text-light);
    margin: 0;
}

.invite-details {
    background: white;
    border-radius: 16px;
    padding: 20px 24px;
    margin-bottom: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    border: 1px solid var(--border);
}

.invite-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

.invite-label {
    font-size: 13px;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

.invite-value {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: 18px;
    font-weight: 700;
    color: var(--primary);
    letter-spacing: 0.5px;
}

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

.invite-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.invite-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: none;
    font-family: 'Inter', -apple-system, sans-serif;
}

.invite-btn svg {
    width: 18px;
    height: 18px;
}

.invite-btn.primary {
    background: var(--primary);
    color: white;
}

.invite-btn.primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
}

.invite-btn.primary svg {
    stroke: white;
}

.invite-btn.secondary {
    background: white;
    color: var(--text-dark);
    border: 2px solid var(--border);
}

.invite-btn.secondary:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.invite-btn.secondary svg {
    stroke: currentColor;
}

.invite-footer {
    font-size: 12px;
    color: var(--text-light);
    margin: 0;
    line-height: 1.5;
}

.invite-footer strong {
    color: var(--primary);
}

/* ============================================
   AUTH BUTTONS - Multiple Sign In Options
   ============================================ */

.auth-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    width: 100%;
    max-width: 300px;
    margin-bottom: 16px;
}

.auth-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    border: 2px solid var(--border);
    background: white;
    font-family: 'Inter', -apple-system, sans-serif;
    width: 100%;
}

.auth-btn img,
.auth-btn svg {
    width: 20px;
    height: 20px;
}

.auth-btn.google {
    background: white;
    color: var(--text-dark);
}

.auth-btn.google:hover {
    border-color: #4285f4;
    background: #f8faff;
}

.auth-btn.apple {
    background: #888;
    color: white;
    border-color: #888;
    cursor: not-allowed;
    opacity: 0.6;
}

.auth-btn.apple:hover {
    background: #888;
}

.auth-btn.apple svg {
    fill: white;
}

.auth-btn.email {
    background: var(--warm-bg);
    color: var(--text-dark);
}

.auth-btn.email:hover {
    border-color: var(--primary);
}

.auth-btn.email svg {
    stroke: var(--text-dark);
}

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

.auth-btn.primary:hover {
    background: var(--primary-dark);
}

.auth-btn.secondary {
    background: white;
    color: var(--text-dark);
}

.auth-btn.secondary:hover {
    border-color: var(--primary);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--text-light);
    font-size: 13px;
    margin: 8px 0;
}

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

.email-auth-form {
    width: 100%;
    max-width: 300px;
}

.email-auth-form .form-group {
    margin-bottom: 12px;
}

.email-auth-form input {
    width: 100%;
    padding: 14px 16px;
    border: 2px solid var(--border);
    border-radius: 12px;
    font-size: 15px;
    font-family: 'Inter', -apple-system, sans-serif;
    transition: border-color 0.2s;
}

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

.email-auth-actions {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.email-auth-actions .auth-btn {
    width: 100%;
}

.auth-back {
    background: none;
    border: none;
    color: var(--text-light);
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    font-family: 'Inter', -apple-system, sans-serif;
}

.auth-back:hover {
    color: var(--primary);
}

.hidden {
    display: none !important;
}

.auth-link {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 14px;
    cursor: pointer;
    padding: 8px;
    font-family: 'Inter', -apple-system, sans-serif;
    margin-bottom: 8px;
}

.auth-link:hover {
    text-decoration: underline;
}

/* ============================================
   SETTINGS VIEW
   ============================================ */

.settings-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 16px;
    box-shadow: var(--shadow);
}

.settings-profile {
    display: flex;
    align-items: center;
    gap: 16px;
}

.settings-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--primary);
}

.settings-profile-info h3 {
    margin: 0 0 4px;
    font-size: 18px;
    color: var(--text-dark);
}

.settings-profile-info p {
    margin: 0;
    font-size: 14px;
    color: var(--text-light);
}

.settings-section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-dark);
    margin: 0 0 4px;
}

.settings-section-desc {
    font-size: 13px;
    color: var(--text-light);
    margin: 0 0 20px;
}

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

.settings-toggle:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.toggle-info {
    flex: 1;
}

.toggle-label {
    display: block;
    font-size: 15px;
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 2px;
}

.toggle-desc {
    display: block;
    font-size: 13px;
    color: var(--text-light);
}

/* Toggle Switch */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 28px;
    flex-shrink: 0;
    margin-left: 16px;
}

.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: #ccc;
    transition: 0.3s;
    border-radius: 28px;
}

.toggle-slider:before {
    position: absolute;
    content: "";
    height: 22px;
    width: 22px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: 0.3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

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

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

.btn-full {
    width: 100%;
}

.settings-avatar-wrap {
    position: relative;
    width: 64px;
    height: 64px;
    flex-shrink: 0;
}

.settings-avatar-fallback {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    font-weight: 600;
    font-family: 'Playfair Display', serif;
}

/* ============================================
   NOTIFICATION PERMISSION POPUP
   ============================================ */

.notification-popup {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 16px;
    animation: slideUpPopup 0.3s ease-out;
}

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

.notification-popup-content {
    background: white;
    border-radius: 20px;
    padding: 24px;
    max-width: 400px;
    margin: 0 auto;
    box-shadow: 0 -4px 30px rgba(0, 0, 0, 0.15);
    text-align: center;
}

.notification-popup-icon {
    font-size: 48px;
    margin-bottom: 12px;
}

.notification-popup-content h3 {
    font-family: 'Playfair Display', serif;
    font-size: 22px;
    margin: 0 0 8px;
    color: var(--text-dark);
}

.notification-popup-content p {
    font-size: 14px;
    color: var(--text-light);
    margin: 0 0 20px;
    line-height: 1.5;
}

.notification-popup-actions {
    display: flex;
    gap: 12px;
}

.notification-popup-actions button {
    flex: 1;
    padding: 14px 16px;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Inter', -apple-system, sans-serif;
}

/* In-app notification toast */
.in-app-notification {
    position: fixed;
    top: 80px;
    right: 16px;
    background: white;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: flex-start;
    gap: 12px;
    max-width: 320px;
    z-index: 1001;
    animation: slideIn 0.3s ease-out;
    border-left: 4px solid var(--primary);
}

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

.in-app-notification .notification-content {
    flex: 1;
}

.in-app-notification strong {
    display: block;
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-dark);
}

.in-app-notification p {
    font-size: 13px;
    color: var(--text-light);
    margin: 0;
}

.in-app-notification button {
    background: none;
    border: none;
    font-size: 16px;
    cursor: pointer;
    color: var(--text-light);
    padding: 0;
}

.settings-avatar-wrap {
    cursor: pointer;
    position: relative;
}

.avatar-edit-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
    padding: 4px 0;
    border-radius: 0 0 50% 50%;
    opacity: 0;
    transition: opacity 0.2s;
}

.settings-avatar-wrap:hover .avatar-edit-overlay {
    opacity: 1;
}

/* =====================================================
   DIETARY RESTRICTIONS & MEMBER PROFILES
   ===================================================== */

/* Dietary Hub on Family Tab - Horizontal Banner */
.dietary-hub {
    background: linear-gradient(135deg, #FFF9F5 0%, #FFF5ED 100%);
    border: 2px solid #FFE0CC;
    border-radius: 12px;
    padding: 0.75rem 1rem;
    margin-bottom: 1rem;
    width: 100%;
}

.dietary-hub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.dietary-hub-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1.1rem;
    color: var(--secondary);
    margin: 0;
}

.dietary-hub-subtitle {
    font-size: 0.75rem;
    color: var(--text-light);
}

.dietary-hub-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
    align-items: center;
}

.dietary-hub-empty {
    text-align: center;
    padding: 0.25rem 0;
    color: var(--text-light);
}

.dietary-hub-empty p:first-child {
    font-weight: 500;
    color: var(--text-dark);
    margin-bottom: 0.25rem;
}

.dietary-hub-hint {
    font-size: 0.8rem;
}

.dietary-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.dietary-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
}

.dietary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.dietary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.4rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
}

.dietary-chip.allergy {
    background: #FFE5E5;
    color: #D32F2F;
    border: 1px solid #FFCDD2;
}

.dietary-chip.preference {
    background: #FFF8E1;
    color: #F57C00;
    border: 1px solid #FFE082;
}

.dietary-chip-members {
    font-size: 0.7rem;
    opacity: 0.8;
    margin-left: 0.25rem;
}

/* Family Members Grid */
.family-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 1rem;
}

.family-card {
    background: var(--card-bg);
    border-radius: 16px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow);
    cursor: pointer;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

.family-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
    border-color: var(--primary);
}

.family-avatar {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 600;
    margin: 0 auto 0.75rem;
}

.family-name {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.family-recipes {
    font-size: 0.8rem;
    color: var(--text-light);
    margin-bottom: 0.5rem;
}

.family-dietary-badges {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
    margin-top: 0.5rem;
}

.dietary-badge {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
}

.dietary-badge.allergy {
    background: #FFE5E5;
}

.dietary-badge.preference {
    background: #FFF8E1;
}

.dietary-badge.more {
    background: #E0E0E0;
    font-size: 0.65rem;
    font-weight: 600;
    color: var(--text-light);
}

/* Member Profile Modal */
.modal-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: 1000;
    padding: 1rem;
}

.modal {
    background: white;
    border-radius: 20px;
    max-width: 480px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
}

.member-profile-modal .modal-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 1.5rem;
    text-align: center;
    position: relative;
    border-radius: 20px 20px 0 0;
}

.modal-header .modal-avatar {
    width: 72px;
    height: 72px;
    background: rgba(255, 255, 255, 0.2);
    border: 3px solid white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    font-weight: 600;
    margin: 0 auto 0.75rem;
}

.modal-header h2 {
    font-family: 'Playfair Display', serif;
    font-size: 1.5rem;
    margin: 0;
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.modal-body {
    padding: 1.5rem;
}

.profile-section {
    margin-bottom: 1.5rem;
}

.profile-section h3 {
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
    color: var(--secondary);
}

.section-hint {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-light);
}

.dietary-picker {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.5rem;
}

.dietary-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
    padding: 0.75rem 0.5rem;
    border: 2px solid var(--border);
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.2s;
    text-align: center;
}

.dietary-option input {
    display: none;
}

.dietary-option:hover {
    border-color: var(--primary);
    background: #FFF9F5;
}

.dietary-option.selected[data-type="allergy"] {
    background: #FFE5E5;
    border-color: #D32F2F;
}

.dietary-option.selected[data-type="preference"] {
    background: #FFF8E1;
    border-color: #F57C00;
}

.dietary-option-icon {
    font-size: 1.5rem;
}

.dietary-option-label {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--text-dark);
}

.other-dietary-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--border);
    border-radius: 10px;
    font-size: 16px; /* Prevent iOS auto-zoom */
    transition: border-color 0.2s;
}

.other-dietary-input:focus {
    outline: none;
    border-color: var(--primary);
}

.input-hint {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.35rem;
}

.modal-footer {
    padding: 1rem 1.5rem 1.5rem;
    text-align: center;
}

.modal-footer .btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 0.875rem 2.5rem;
    border-radius: 25px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.modal-footer .btn-primary:hover {
    background: var(--primary-dark);
}

/* Responsive */
@media (max-width: 480px) {
    .dietary-hub {
        padding: 1rem;
    }
    
    .dietary-picker {
        grid-template-columns: repeat(3, 1fr);
    }
    
    .family-members-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =====================================================
   FAMILY VIEW FIXES - Mobile Optimized
   ===================================================== */

/* Override family grid for square cards */
.family-members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
}

.family-card {
    aspect-ratio: 1;
    padding: 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: unset;
}

.family-avatar {
    width: 44px;
    height: 44px;
    font-size: 1.25rem;
    margin-bottom: 0.5rem;
}

.family-avatar-img {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 0.5rem;
}

.family-name {
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.family-dietary-badges {
    margin-top: 0.25rem;
}

.dietary-badge {
    width: 20px;
    height: 20px;
    font-size: 0.65rem;
}

/* Mobile Modal Fixes */
@media (max-width: 480px) {
    .modal-overlay.member-modal {
        padding: 0;
        align-items: flex-end;
    }
    
    .member-profile-modal {
        border-radius: 20px 20px 0 0;
        max-height: 85vh;
        width: 100%;
    }
    
    .modal-header {
        padding: 1.25rem;
        border-radius: 20px 20px 0 0;
    }
    
    .modal-header .modal-avatar,
    .modal-header .modal-avatar-img {
        width: 56px;
        height: 56px;
        font-size: 1.5rem;
    }
    
    .modal-header h2 {
        font-size: 1.25rem;
    }
    
    .modal-body {
        padding: 1rem;
        max-height: 50vh;
        overflow-y: auto;
    }
    
    .profile-section h3 {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .section-hint {
        display: block;
        margin-top: 0.15rem;
    }
    
    .dietary-picker {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.4rem;
    }
    
    .dietary-option {
        padding: 0.5rem 0.25rem;
    }
    
    .dietary-option-icon {
        font-size: 1.25rem;
    }
    
    .dietary-option-label {
        font-size: 0.65rem;
    }
    
    .modal-footer {
        padding: 0.75rem 1rem 1.5rem;
    }
    
    .modal-footer .btn-primary {
        width: 100%;
        padding: 0.75rem;
    }
    
    /* Dietary hub mobile */
    .dietary-hub {
        padding: 1rem;
        margin-bottom: 1rem;
    }
    
    .dietary-hub-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
    
    .dietary-chip {
        padding: 0.3rem 0.5rem;
        font-size: 0.75rem;
    }
    
    .dietary-chip-members {
        font-size: 0.65rem;
    }
}

/* Modal avatar image */
.modal-avatar-img {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid white;
    margin: 0 auto 0.75rem;
}

@media (max-width: 480px) {
    .modal-avatar-img {
        width: 56px;
        height: 56px;
    }
}

/* =====================================================
   MODAL LAYOUT FIX - Force Vertical Stack
   ===================================================== */

.member-profile-modal {
    display: flex;
    flex-direction: column !important;
}

.modal-header {
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.modal-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.profile-section {
    display: flex;
    flex-direction: column;
}

.modal-footer {
    flex-shrink: 0;
}

/* Ensure modal itself is vertical, not horizontal */
.modal {
    display: flex;
    flex-direction: column;
}

/* Fix any potential horizontal layout issues */
.member-profile-modal .modal-header,
.member-profile-modal .modal-body,
.member-profile-modal .modal-footer {
    width: 100%;
}

/* =====================================================
   MODAL HEADER FIX - Keep close button in corner
   ===================================================== */

.member-profile-modal .modal-header {
    position: relative;
    text-align: center;
}

.member-profile-modal .modal-header .modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
}

.member-profile-modal .modal-header h2 {
    margin: 0;
}

.member-profile-modal .modal-header .modal-avatar,
.member-profile-modal .modal-header .modal-avatar-img {
    display: block;
    margin: 0 auto 0.75rem auto;
}

/* =====================================================
   MEMBER PROFILE MODAL - COMPLETE OVERRIDE
   ===================================================== */

.modal-overlay .modal.member-profile-modal {
    display: block !important;
    position: relative !important;
    top: auto !important;
    left: auto !important;
    right: auto !important;
    bottom: auto !important;
    background: white;
    border-radius: 20px;
    max-width: 400px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
}

.modal-overlay .member-profile-modal .modal-header {
    display: block;
    text-align: center;
    position: relative;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 1.5rem;
    border-radius: 20px 20px 0 0;
}

.modal-overlay .member-profile-modal .modal-body {
    display: block;
    padding: 1.25rem;
    max-height: 50vh;
    overflow-y: auto;
}

.modal-overlay .member-profile-modal .modal-footer {
    display: block;
    padding: 1rem 1.5rem 1.5rem;
    text-align: center;
    border-top: 1px solid var(--border);
}

@media (max-width: 480px) {
    .modal-overlay .modal.member-profile-modal {
        max-width: 100%;
        max-height: 85vh;
        border-radius: 20px 20px 0 0;
        margin-top: auto;
    }
}

/* =====================================================
   DIETARY HUB - Horizontal Banner Style
   ===================================================== */

.dietary-hub {
    display: block;
    width: 100%;
    background: linear-gradient(135deg, #FFF9F5 0%, #FFF5ED 100%);
    border: 2px solid #FFE0CC;
    border-radius: 16px;
    padding: 1rem 1.25rem;
    margin-bottom: 1.25rem;
}

.dietary-hub-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.dietary-hub-header h3 {
    font-family: 'Playfair Display', serif;
    font-size: 1rem;
    color: var(--secondary);
    margin: 0;
}

.dietary-hub-content {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 1rem;
}

.dietary-section {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
}

.dietary-section-label {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-light);
    white-space: nowrap;
}

.dietary-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.dietary-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.3rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 500;
    white-space: nowrap;
}

.dietary-chip-members {
    font-size: 0.65rem;
    opacity: 0.85;
}

.dietary-hub-empty {
    text-align: center;
    padding: 0.5rem;
    color: var(--text-light);
}

.dietary-hub-empty p {
    margin: 0;
}

.dietary-hub-empty p:first-child {
    font-weight: 500;
    color: var(--text-dark);
}

.dietary-hub-hint {
    font-size: 0.75rem;
    margin-top: 0.25rem;
}

/* Mobile: Keep horizontal, allow wrap */
@media (max-width: 480px) {
    .dietary-hub {
        padding: 0.875rem 1rem;
    }
    
    .dietary-hub-content {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.5rem;
    }
    
    .dietary-section {
        flex-direction: row;
        flex-wrap: wrap;
    }
}

/* =====================================================
   DIETARY HUB - CLEAN HORIZONTAL BANNER
   ===================================================== */

#family-grid .dietary-hub {
    display: block !important;
    width: 100% !important;
    background: linear-gradient(135deg, #FFF5F5 0%, #FFF0ED 100%) !important;
    border: 1px solid #FFD4CC !important;
    padding: 0.875rem 1rem !important;
    margin-bottom: 1.25rem !important;
    border-radius: 12px !important;
}

#family-grid .dietary-hub-header {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    margin-bottom: 0.75rem !important;
    padding-bottom: 0.5rem !important;
    border-bottom: 1px solid rgba(0,0,0,0.06) !important;
}

#family-grid .dietary-hub-header h3 {
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

#family-grid .dietary-hub-subtitle {
    display: none !important; /* Hide on mobile for cleaner look */
}

#family-grid .dietary-hub-content {
    display: flex !important;
    flex-direction: column !important;
    align-items: stretch !important; /* Each section takes full width */
    gap: 0.625rem !important;
}

#family-grid .dietary-section {
    display: flex !important;
    flex-direction: row !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: 0.5rem !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

#family-grid .dietary-section-label {
    width: 85px !important;
    min-width: 85px !important;
    max-width: 85px !important;
    flex-shrink: 0 !important;
    flex-grow: 0 !important;
    font-size: 0.65rem !important;
    font-weight: 600 !important;
    text-transform: uppercase !important;
    letter-spacing: 0 !important;
    color: #666 !important;
    padding-top: 0.3rem !important;
    text-align: left !important;
    white-space: nowrap !important;
    overflow: hidden !important;
}

#family-grid .dietary-chips {
    display: flex !important;
    flex-wrap: wrap !important;
    gap: 0.375rem !important;
    flex: 1 !important;
}

#family-grid .dietary-chip {
    padding: 0.25rem 0.5rem !important;
    font-size: 0.75rem !important;
    border-radius: 6px !important;
}

#family-grid .dietary-chip-members {
    font-size: 0.65rem !important;
    opacity: 0.75 !important;
    margin-left: 0.25rem !important;
}

#family-grid .dietary-hub-empty {
    text-align: center !important;
    padding: 0.5rem 0 !important;
    color: #888 !important;
    font-size: 0.85rem !important;
}

#family-grid .dietary-hub-empty p {
    margin: 0 !important;
}

#family-grid .dietary-hub-hint {
    font-size: 0.75rem !important;
    margin-top: 0.25rem !important;
}

/* =====================================================
   iOS AUTO-ZOOM PREVENTION
   iOS Safari zooms on inputs with font-size < 16px
   ===================================================== */

input[type="text"],
input[type="email"],
input[type="password"],
input[type="search"],
input[type="tel"],
input[type="url"],
input[type="number"],
textarea,
select {
    font-size: 16px !important;
}

/* Specifically target the dietary other input */
.other-dietary-input,
.modal input,
.modal textarea {
    font-size: 16px !important;
}

/* =====================================================
   RECIPE ALLERGEN OVERLAY (Image bottom-left)
   ===================================================== */

.recipe-image {
    position: relative;
}

.recipe-allergen-overlay {
    position: absolute;
    bottom: 8px;
    left: 8px;
    display: flex;
    gap: 3px;
    padding: 5px 8px;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.recipe-allergen-overlay span {
    font-size: 0.85rem;
    line-height: 1;
}

.recipe-allergen-overlay span:last-child:not(:first-child) {
    font-size: 0.7rem;
    font-weight: 600;
    color: #666;
    padding-left: 2px;
    display: flex;
    align-items: center;
}

/* =====================================================
   RECIPE SAFETY WARNING BANNER
   ===================================================== */

.recipe-safety-warning {
    background: linear-gradient(135deg, #FFF3E0 0%, #FFECB3 100%);
    border: 1px solid #FFB74D;
    border-radius: 12px;
    padding: 0.875rem 1rem;
    margin: 1rem 0;
}

.safety-warning-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.safety-warning-icon {
    font-size: 1.25rem;
}

.safety-warning-title {
    font-weight: 600;
    color: #E65100;
    font-size: 0.95rem;
}

.safety-warning-list {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.safety-warning-item {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.warning-allergen {
    font-weight: 600;
    color: #BF360C;
}

.warning-members {
    color: #5D4037;
}

/* =====================================================
   RECIPE FILTER BAR
   ===================================================== */

/* Recipe Search Bar */
.recipe-search-bar {
    margin-bottom: 1rem;
    padding: 0 0.25rem;
}

.search-input-wrapper {
    display: flex;
    align-items: center;
    background: white;
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 0.5rem 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input-wrapper:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230, 126, 34, 0.1);
}

.search-icon {
    font-size: 1rem;
    margin-right: 0.75rem;
    opacity: 0.5;
}

.search-input-wrapper input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 16px; /* Prevents iOS zoom */
    background: transparent;
    color: var(--text-dark);
}

.search-input-wrapper input::placeholder {
    color: var(--text-light);
}

.search-clear-btn {
    background: var(--border);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    font-size: 12px;
    color: var(--text-light);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
}

.search-clear-btn:hover {
    background: var(--text-light);
    color: white;
}

.recipe-filter-bar {
    margin-bottom: 1rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.filter-chips {
    display: flex;
    gap: 0.5rem;
    padding: 0.25rem 0;
}

.filter-chip {
    flex-shrink: 0;
    padding: 0.5rem 1rem;
    border: 1px solid var(--border);
    border-radius: 20px;
    background: white;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-dark);
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.filter-chip:hover {
    border-color: var(--primary);
    background: #FFF5F0;
}

.filter-chip.active {
    background: var(--primary);
    border-color: var(--primary);
    color: white;
}

/* =====================================================
   MODAL SAFE AREA FIX - Mobile browser bottom bar
   ===================================================== */

.modal-footer {
    padding-bottom: calc(1rem + env(safe-area-inset-bottom, 20px)) !important;
}

.member-profile-modal .modal-footer,
.add-member-modal .modal-footer {
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 20px)) !important;
    margin-bottom: env(safe-area-inset-bottom, 0) !important;
}

/* Extra padding for iOS Safari bottom bar */
@supports (-webkit-touch-callout: none) {
    .modal-footer {
        padding-bottom: calc(1.5rem + 34px) !important;
    }
}

/* =====================================================
   DYNAMIC INGREDIENT INPUTS
   ===================================================== */

.dynamic-inputs {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.dynamic-input-row {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.dynamic-input-row input {
    flex: 1;
}

/* Step numbers for instructions */
.step-number {
    font-weight: 600;
    color: var(--primary);
    min-width: 1.5rem;
    flex-shrink: 0;
}

.btn-remove-input {
    width: 36px;
    height: 36px;
    border: none;
    background: #ffebee;
    color: #d32f2f;
    border-radius: 8px;
    font-size: 1.25rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.btn-remove-input:hover {
    background: #ffcdd2;
}

.btn-add-input {
    width: 100%;
    padding: 0.75rem;
    border: 2px dashed var(--border);
    background: transparent;
    color: var(--primary);
    border-radius: 10px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    margin-top: 0.25rem;
}

.btn-add-input:hover {
    border-color: var(--primary);
    background: #FFF5F0;
}

/* =====================================================
   ONBOARDING SCREENS
   ===================================================== */

#onboarding-screen {
    background: linear-gradient(135deg, #FDF6E3 0%, #FFFFFF 100%);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
}

#onboarding-screen.active {
    display: block !important;
}

.onboarding-container {
    height: 100%;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.onboarding-slide {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: none;
    overflow-y: auto;
    padding: 20px;
}

.onboarding-slide.active {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    min-height: 100%;
}

.onboarding-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    max-width: 400px;
}

.onboarding-footer {
    margin-top: 30px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 340px;
}

.onboarding-icon {
    font-size: 80px;
    margin-bottom: 30px;
}

.onboarding-content h1 {
    font-family: 'Playfair Display', serif;
    font-size: 32px;
    font-weight: 700;
    color: #2C3E50;
    margin-bottom: 16px;
}

.onboarding-subtitle {
    font-size: 18px;
    color: #5D6D7E;
    line-height: 1.5;
    max-width: 320px;
    margin-bottom: 40px;
}

.onboarding-features {
    display: flex;
    flex-direction: column;
    gap: 20px;
    width: 100%;
    max-width: 340px;
}

.onboarding-feature {
    display: flex;
    align-items: center;
    gap: 16px;
    text-align: left;
    background: white;
    padding: 16px 20px;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0,0,0,0.06);
}

.feature-icon {
    font-size: 24px;
    flex-shrink: 0;
}

.onboarding-feature span:last-child {
    font-size: 16px;
    color: #2C3E50;
    font-weight: 500;
}

.onboarding-footer {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    width: 100%;
    max-width: 340px;
}

.onboarding-dots {
    display: flex;
    gap: 10px;
}

.onboarding-dots .dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #D5DBDB;
    transition: all 0.3s;
}

.onboarding-dots .dot.active {
    background: var(--primary);
    width: 30px;
    border-radius: 5px;
}

.btn-onboarding-next {
    width: 100%;
    max-width: 320px;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-onboarding-next:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

/* Paywall Specific Styles */
.onboarding-content.paywall {
    padding-top: 0;
    flex: none;
}

.onboarding-slide[data-slide="3"].active {
    justify-content: center;
    padding-top: 40px;
    padding-bottom: 40px;
}

.onboarding-slide[data-slide="3"] .onboarding-footer {
    margin-top: 24px;
}

.paywall-header {
    margin-bottom: 30px;
}

.paywall-header .onboarding-icon {
    font-size: 60px;
    margin-bottom: 20px;
}

.paywall-header h1 {
    font-size: 28px;
    margin-bottom: 10px;
}

.paywall-benefits {
    width: 100%;
    max-width: 340px;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 30px;
}

.paywall-benefit {
    display: flex;
    align-items: center;
    gap: 14px;
    text-align: left;
}

.benefit-check {
    width: 28px;
    height: 28px;
    background: #E8F8F5;
    color: #27AE60;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
    flex-shrink: 0;
}

.paywall-benefit span:last-child {
    font-size: 16px;
    color: #2C3E50;
}

.paywall-pricing {
    display: flex;
    gap: 16px;
    width: 100%;
    max-width: 340px;
}

.price-option {
    flex: 1;
    background: white;
    border: 2px solid #E5E8E8;
    border-radius: 16px;
    padding: 20px 16px;
    cursor: pointer;
    transition: all 0.2s;
    position: relative;
}

.price-option.selected {
    border-color: var(--primary);
    background: #FEF5E7;
}

.price-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    font-size: 11px;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    white-space: nowrap;
}

.price-period {
    font-size: 14px;
    font-weight: 600;
    color: #5D6D7E;
    margin-bottom: 8px;
}

.price-amount {
    font-size: 24px;
    font-weight: 700;
    color: #2C3E50;
}

.price-amount span {
    font-size: 14px;
    font-weight: 500;
    color: #5D6D7E;
}

.price-savings {
    font-size: 13px;
    color: #27AE60;
    font-weight: 600;
    margin-top: 6px;
}

.paywall-footer {
    gap: 12px;
}

.btn-paywall-start {
    width: 100%;
    max-width: 320px;
    padding: 18px 40px;
    font-size: 18px;
    font-weight: 600;
    color: white;
    background: var(--primary);
    border: none;
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-paywall-start:hover {
    background: var(--primary-dark);
}

.paywall-skip-text {
    font-size: 15px;
    color: #95A5A6;
}

.paywall-skip-text a {
    color: #5D6D7E;
    text-decoration: underline;
}

.paywall-skip-text a:hover {
    color: var(--primary);
}

.btn-skip-paywall {
    background: transparent;
    border: none;
    color: #5D6D7E;
    font-size: 16px;
    padding: 15px 30px;
    cursor: pointer;
    text-decoration: underline;
    -webkit-tap-highlight-color: rgba(0,0,0,0.1);
}

/* Safe area for notch */
@supports (padding-top: env(safe-area-inset-top)) {
    .onboarding-slide {
        padding-top: calc(60px + env(safe-area-inset-top));
    }
    .onboarding-footer {
        padding-bottom: calc(30px + env(safe-area-inset-bottom));
    }
}

/* Single pricing option */
.paywall-pricing.single {
    justify-content: center;
}

.price-option.single-option {
    max-width: 280px;
    padding: 24px 20px;
}

.price-breakdown {
    font-size: 14px;
    color: #27AE60;
    font-weight: 500;
    margin-top: 8px;
}

/* Paywall Modal */
/* Force paywall overlay to center on all screens */
.paywall-overlay {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.paywall-modal {
    background: white;
    border-radius: 24px;
    max-width: 380px;
    width: 90%;
    padding: 40px 30px;
    text-align: center;
    position: relative;
}

.paywall-modal .modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f0f0f0;
    border: none;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    font-size: 18px;
    cursor: pointer;
    color: #666;
}

.paywall-modal-icon {
    font-size: 50px;
    margin-bottom: 16px;
}

.paywall-modal h2 {
    font-family: 'Playfair Display', serif;
    font-size: 26px;
    color: #2C3E50;
    margin-bottom: 10px;
}

.paywall-modal-reason {
    color: #5D6D7E;
    font-size: 16px;
    margin-bottom: 24px;
}

.paywall-modal-benefits {
    text-align: left;
    margin-bottom: 24px;
}

.paywall-modal-benefits .paywall-benefit {
    padding: 8px 0;
    font-size: 15px;
}

.paywall-modal-price {
    margin-bottom: 20px;
}

.price-big {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary);
}

.price-period {
    font-size: 16px;
    color: #5D6D7E;
}

.paywall-modal .btn-paywall-start {
    width: 100%;
    margin-bottom: 12px;
}

.paywall-modal .paywall-skip-text {
    margin: 0;
}

/* Success Modal */
.success-modal {
    background: white;
    border-radius: 24px;
    padding: 40px 30px;
    text-align: center;
    max-width: 320px;
    width: 90%;
}

.success-icon {
    font-size: 64px;
    margin-bottom: 16px;
}

.success-modal h2 {
    font-family: "Playfair Display", serif;
    font-size: 28px;
    color: #2C3E50;
    margin-bottom: 8px;
}

.success-modal p {
    color: #5D6D7E;
    font-size: 16px;
    margin-bottom: 8px;
}

.success-hint {
    font-size: 14px !important;
    margin-top: 16px !important;
}

.btn-success-close {
    width: 100%;
    padding: 16px;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 20px;
}

.btn-success-close:hover {
    background: var(--primary-dark);
}


/* =====================================================
   WELCOME WIZARD
   ===================================================== */

.wizard-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    padding: 1rem;
    animation: fadeIn 0.3s ease;
}

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

.wizard-card {
    background: white;
    border-radius: 20px;
    max-width: 380px;
    width: 100%;
    overflow: hidden;
    animation: slideUp 0.4s ease;
}

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

.wizard-header {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 2rem;
    text-align: center;
}

.wizard-emoji {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
}

.wizard-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.wizard-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
}

.wizard-features {
    padding: 1.5rem;
}

.wizard-feature {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    padding: 0.75rem 0;
}

.wizard-feature:not(:last-child) {
    border-bottom: 1px solid var(--border);
}

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

.wizard-feature-text h4 {
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
    color: var(--text-dark);
}

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

.wizard-actions {
    padding: 0 1.5rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.wizard-btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s;
}

.wizard-btn-primary:hover {
    background: var(--primary-dark);
}

.wizard-btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: none;
    padding: 0.75rem;
    font-size: 0.9rem;
    cursor: pointer;
}

.wizard-btn-secondary:hover {
    color: var(--text-dark);
}

/* =====================================================
   MY RECIPES LIST (Settings)
   ===================================================== */

.my-recipes-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 1rem;
}

.my-recipe-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--warm-bg);
    border-radius: 12px;
    cursor: pointer;
    transition: background 0.2s;
}

.my-recipe-item:hover {
    background: var(--border);
}

.my-recipe-thumb {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    object-fit: cover;
    background: var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.my-recipe-thumb img {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    object-fit: cover;
}

.my-recipe-info {
    flex: 1;
    min-width: 0;
}

.my-recipe-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-dark);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.my-recipe-meta {
    font-size: 0.8rem;
    color: var(--text-light);
}

.my-recipe-edit {
    padding: 0.5rem 0.75rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 0.85rem;
    cursor: pointer;
    flex-shrink: 0;
}

.my-recipe-edit:hover {
    background: var(--primary-dark);
}

.my-recipes-empty {
    text-align: center;
    padding: 1.5rem;
    color: var(--text-light);
    font-size: 0.9rem;
}
