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

html, body {
    height: 100%;
    width: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Helvetica Neue', Arial, sans-serif;
    background: #ffffff;
    color: #333;
    overflow-x: hidden;
    line-height: 1.6;
}

/* Clean white background - let food photos stand out */
body {
    background: #f5f5f5;
    padding-top: 70px;
}

@media (max-width: 768px) {
    body {
        padding-top: 60px;
        padding-bottom: 80px;
    }
}

/* Top Navigation Bar - Clean and minimal */
.top-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: #ffffff;
    border-bottom: 1px solid #e0e0e0;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.nav-left .nav-logo {
    font-size: 1.8rem;
    font-weight: 800;
    color: #ff6b6b;
    letter-spacing: -1px;
}

.nav-right {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: #333;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #ff6b6b;
    background: #fff5f5;
}

.nav-link.active {
    color: #ff6b6b;
    font-weight: 600;
}

@media (max-width: 768px) {
    .top-nav {
        padding: 0.75rem 1rem;
    }
    
    .nav-left .nav-logo {
        font-size: 1.4rem;
    }
    
    .nav-right {
        gap: 0.5rem;
    }
    
    .nav-link {
        padding: 0.5rem 0.75rem;
        font-size: 0.85rem;
    }
}

/* Hero Section - Clean with clear CTA */
#hero-section {
    padding: 4rem 2rem;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    #hero-section {
        padding: 3rem 1.5rem;
    }
}

.hero-content h1 {
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 1rem;
    letter-spacing: -2px;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 2rem;
    opacity: 0.95;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

#join-fun-btn, #explore-recipes-btn {
    padding: 1rem 2.5rem;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

#join-fun-btn {
    background: #ff6b6b;
    color: white;
}

#join-fun-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

#explore-recipes-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 2px solid white;
}

#explore-recipes-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-2px);
}

/* Main Container */
main {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Section Styling - Clean white cards */
#trending-section, #featured-section, #popular-section, #machines-landing-section {
    padding: 3rem 2rem;
    background: #ffffff;
    margin-bottom: 2rem;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    #trending-section, #featured-section, #popular-section, #machines-landing-section {
        padding: 2rem 1rem;
        margin-bottom: 1rem;
    }
}

#trending-section h2, #popular-section h2, #machines-landing-section h2 {
    font-size: 2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1.5rem;
    text-align: center;
}

/* Recipe Cards - FOOD NETWORK STYLE */
.popular-recipes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin-bottom: 2rem;
}

@media (max-width: 1024px) {
    .popular-recipes-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .popular-recipes-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
    }
}

.popular-recipe-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    cursor: pointer;
    border: 1px solid #e0e0e0;
}

.popular-recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

/* Photo is HERO - takes up 60% of card */
.popular-recipe-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    position: relative;
}

@media (max-width: 768px) {
    .popular-recipe-image {
        height: 150px;
    }
}

/* Star rating badge overlay on photo */
.recipe-rating-badge {
    position: absolute;
    bottom: 8px;
    left: 8px;
    background: rgba(255, 255, 255, 0.95);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ff6b6b;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Quick info badges on photo */
.recipe-quick-info {
    position: absolute;
    top: 8px;
    right: 8px;
    display: flex;
    gap: 0.5rem;
}

.info-badge {
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 500;
}

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

.popular-recipe-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 0.5rem;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.recipe-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #666;
}

.recipe-author-small {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    color: #888;
}

/* Category Collections Section */
.category-collections {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .category-collections {
        grid-template-columns: 1fr;
    }
}

.collection-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid #e0e0e0;
}

.collection-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.collection-image {
    width: 100%;
    height: 180px;
    background-size: cover;
    background-position: center;
    position: relative;
}

.collection-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 1.5rem 1rem;
    color: white;
}

.collection-overlay h3 {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.3rem;
}

.collection-overlay p {
    font-size: 0.9rem;
    opacity: 0.9;
}

/* Machine Reviews */
#featured-machines-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

@media (max-width: 768px) {
    #featured-machines-grid {
        grid-template-columns: 1fr;
    }
}

.machine-review-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
}

.machine-review-card .machine-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.machine-review-card .machine-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.machine-review-card .machine-content {
    padding: 1.5rem;
}

.machine-rating {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
    color: #ff6b6b;
}

.machine-review-card h3 {
    font-size: 1.4rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 0.5rem;
}

.machine-review-card p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.5rem;
}

.reviewer {
    color: #888;
    font-size: 0.9rem;
    font-style: italic;
}

/* Browse All Button */
.browse-all-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 1rem 2.5rem;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: block;
    margin: 0 auto;
}

.browse-all-btn:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.4);
}

.section-footer {
    text-align: center;
    margin-top: 2rem;
}

/* Recipes Page - Clean white design */
.recipes-page-section {
    padding: 2rem 0;
    background: #f5f5f5;
    min-height: 100vh;
}

.recipes-header {
    text-align: center;
    margin-bottom: 2rem;
    background: white;
    border-radius: 12px;
    padding: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.recipes-header h1 {
    font-size: 2.5rem;
    color: #333;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.recipes-header p {
    color: #666;
    font-size: 1.1rem;
}

/* Search Section - Clean and prominent */
.search-container {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.search-box {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.search-box input {
    flex: 1;
    padding: 0.8rem 1.2rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: #ff6b6b;
}

.search-box button {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.search-box button:hover {
    background: #ff5252;
}

.filter-controls {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    flex-wrap: wrap;
}

.filter-controls select {
    padding: 0.6rem 1rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.filter-controls select:focus {
    outline: none;
    border-color: #ff6b6b;
}

/* Recipe Cards Grid - Food Network Style */
#all-recipes-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

@media (max-width: 1200px) {
    #all-recipes-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    #all-recipes-container {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }
}

.recipe-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid #e0e0e0;
    transition: all 0.3s ease;
}

.recipe-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

.recipe-card h3 {
    padding: 1.5rem 1.5rem 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: #333;
    line-height: 1.3;
}

.recipe-author {
    padding: 0 1.5rem;
    color: #888;
    font-size: 0.9rem;
    margin-bottom: 0.5rem;
}

.recipe-category {
    padding: 0 1.5rem;
    display: inline-block;
    background: #fff5f5;
    color: #ff6b6b;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    font-size: 0.8rem;
    font-weight: 600;
    margin: 0 1.5rem 1rem;
}

/* Recipe Info - Quick stats like Food Network */
.recipe-info {
    display: flex;
    justify-content: space-around;
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}

.recipe-info span {
    font-size: 0.85rem;
    color: #666;
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

/* Recipe Image Gallery */
.recipe-image-single, .recipe-image-gallery {
    width: 100%;
    margin: 0;
}

.recipe-image-single img, .recipe-image-gallery img {
    width: 100%;
    height: 250px;
    object-fit: cover;
}

@media (max-width: 768px) {
    .recipe-image-single img, .recipe-image-gallery img {
        height: 200px;
    }
}

.recipe-image-gallery {
    position: relative;
}

.image-container {
    position: relative;
}

.gallery-controls {
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    padding: 0 0.5rem;
}

.gallery-btn {
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #333;
}

.gallery-btn:hover {
    background: white;
    transform: scale(1.1);
}

.image-counter {
    position: absolute;
    bottom: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
}

/* Recipe Details */
.recipe-ingredients, .recipe-instructions {
    padding: 1.5rem;
}

.recipe-ingredients h4, .recipe-instructions h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.recipe-ingredients ul {
    list-style: none;
    padding: 0;
}

.recipe-ingredients li {
    padding: 0.5rem 0;
    border-bottom: 1px solid #f0f0f0;
    color: #555;
}

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

.recipe-instructions pre {
    white-space: pre-wrap;
    word-wrap: break-word;
    font-family: inherit;
    line-height: 1.8;
    color: #555;
}

/* Recipe Actions */
.recipe-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid #f0f0f0;
}

.upvote-btn {
    background: white;
    border: 2px solid #ff6b6b;
    color: #ff6b6b;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.upvote-btn:hover {
    background: #ff6b6b;
    color: white;
}

/* Comments Section */
.recipe-comments {
    padding: 1.5rem;
    border-top: 1px solid #f0f0f0;
    background: #fafafa;
}

.recipe-comments h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 1rem;
}

.comments-list {
    margin-bottom: 1rem;
}

.comment {
    background: white;
    padding: 1rem;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    border: 1px solid #e0e0e0;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.5rem;
}

.comment-header strong {
    color: #333;
}

.comment-date {
    color: #888;
    font-size: 0.85rem;
}

.comment-text {
    color: #555;
    line-height: 1.6;
}

.add-comment textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    resize: vertical;
    margin-bottom: 0.5rem;
}

.add-comment textarea:focus {
    outline: none;
    border-color: #ff6b6b;
}

.add-comment-btn {
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 0.8rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.add-comment-btn:hover {
    background: #ff5252;
}

/* Pagination */
.pagination-controls {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1rem;
    margin-top: 3rem;
    padding: 1.5rem;
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.pagination-controls button {
    padding: 0.8rem 1.5rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    background: white;
    color: #333;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pagination-controls button:not(:disabled):hover {
    border-color: #ff6b6b;
    color: #ff6b6b;
}

.pagination-controls button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.pagination-controls span {
    color: #333;
    font-weight: 600;
}

/* Bottom Navigation - Mobile */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: white;
    border-top: 1px solid #e0e0e0;
    padding: 0.75rem 0;
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.05);
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: #666;
    transition: all 0.2s ease;
}

.bottom-nav-item.active {
    color: #ff6b6b;
}

.bottom-nav-icon {
    width: 24px;
    height: 24px;
    margin-bottom: 0.25rem;
}

.bottom-nav-label {
    font-size: 0.7rem;
    font-weight: 500;
}

@media (min-width: 769px) {
    .bottom-nav {
        display: none;
    }
}

/* Footer */
.footer, .footer-banner {
    background: #2c3e50;
    color: white;
    padding: 2rem;
    text-align: center;
    margin-top: 3rem;
}

.footer-links {
    display: flex;
    gap: 2rem;
    justify-content: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.footer-link {
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

.footer-link:hover {
    color: #ff6b6b;
}

.footer-text, .footer p {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 12px;
    width: 90%;
    max-width: 500px;
    position: relative;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 2rem;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close:hover {
    color: #333;
}

.modal-content h2 {
    color: #333;
    margin-bottom: 1.5rem;
    font-size: 1.8rem;
    font-weight: 700;
}

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

.form-group label {
    display: block;
    color: #333;
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.8rem;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.2s ease;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: #ff6b6b;
}

form button[type="submit"] {
    width: 100%;
    background: #ff6b6b;
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

form button[type="submit"]:hover {
    background: #ff5252;
}

.auth-options {
    margin-top: 1.5rem;
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.auth-options a {
    color: #ff6b6b;
    text-decoration: none;
    font-size: 0.95rem;
}

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

/* Photo Upload */
.photo-upload-container {
    margin-top: 1rem;
}

.photo-upload-area {
    border: 2px dashed #e0e0e0;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.photo-upload-area:hover {
    border-color: #ff6b6b;
    background: #fff5f5;
}

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

.upload-hint {
    color: #888;
    font-size: 0.85rem;
    margin-top: 0.5rem;
}

.photo-preview-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.photo-preview {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
}

.photo-preview img {
    width: 100%;
    height: 100px;
    object-fit: cover;
}

.remove-photo {
    position: absolute;
    top: 4px;
    right: 4px;
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    cursor: pointer;
    font-size: 1rem;
    color: #ff6b6b;
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.mb-2 {
    margin-bottom: 2rem;
}

.mt-2 {
    margin-top: 2rem;
}
