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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background: #faf8f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navbar */
.navbar {
    background: #2c1810;
    color: #fff;
    padding: 1rem 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 1.5rem;
    font-weight: bold;
    color: #f5d6b3;
    text-decoration: none;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 2rem;
}

.nav-links a {
    color: #f5d6b3;
    text-decoration: none;
    transition: color 0.3s;
    font-weight: 500;
}

.nav-links a:hover,
.nav-links a.active {
    color: #e8a87c;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, #2c1810 0%, #4a2a1e 100%);
    color: white;
    padding: 4rem 0;
    text-align: center;
    min-height: 400px;
    display: flex;
    align-items: center;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    color: #f5d6b3;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 12px 30px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: #e8a87c;
    color: #2c1810;
}

.btn-primary:hover {
    background: #f5d6b3;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(232, 168, 124, 0.4);
}

/* Features */
.features {
    padding: 4rem 0;
}

.features h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: #2c1810;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 15px;
    text-align: center;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

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

.feature-card h3 {
    margin-bottom: 0.5rem;
    color: #2c1810;
}

/* Page Header */
.page-header {
    background: linear-gradient(135deg, #4a2a1e 0%, #6b3a2a 100%);
    color: white;
    padding: 3rem 0;
    text-align: center;
}

.page-header h1 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
}

/* Recipes */
.recipes-section {
    padding: 3rem 0;
}

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

.filter-btn {
    padding: 8px 20px;
    border: 2px solid #2c1810;
    background: transparent;
    border-radius: 25px;
    cursor: pointer;
    transition: all 0.3s;
    font-weight: 500;
}

.filter-btn:hover,
.filter-btn.active {
    background: #2c1810;
    color: white;
}

.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 2rem;
}

.recipe-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: transform 0.3s;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.1);
}

.recipe-image {
    width: 100%;
    height: 200px;
    background: #e8d5c4;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 3rem;
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-content h3 {
    margin-bottom: 0.5rem;
    color: #2c1810;
}

.recipe-meta {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
    font-size: 0.9rem;
    color: #666;
}

.difficulty {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.difficulty.easy { background: #d4edda; color: #155724; }
.difficulty.medium { background: #fff3cd; color: #856404; }
.difficulty.hard { background: #f8d7da; color: #721c24; }

/* Starters */
.starter-section {
    padding: 3rem 0;
}

.starter-info h2 {
    color: #2c1810;
    margin-top: 2rem;
    margin-bottom: 1rem;
}

.starters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 2rem;
    margin-top: 2rem;
}

.starter-card {
    background: white;
    padding: 1.5rem;
    border-radius: 15px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    border-left: 4px solid #e8a87c;
}

.starter-card h3 {
    color: #2c1810;
    margin-bottom: 0.5rem;
}

/* Footer */
footer {
    background: #2c1810;
    color: #f5d6b3;
    text-align: center;
    padding: 2rem 0;
    margin-top: 3rem;
}

/* Loading */
.loading {
    text-align: center;
    padding: 2rem;
    font-size: 1.2rem;
    color: #666;
}

/* Responsive */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .recipes-grid,
    .starters-grid {
        grid-template-columns: 1fr;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
}

/* Stats */
.stats {
    background: #2c1810;
    color: #f5d6b3;
    padding: 3rem 0;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    text-align: center;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-size: 3rem;
    font-weight: bold;
    color: #e8a87c;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.8;
    margin-top: 0.3rem;
}

.search-bar {
    max-width: 600px;
    margin: 0 auto 2rem;
}

.search-bar input {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e0d5cc;
    border-radius: 30px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.search-bar input:focus {
    outline: none;
    border-color: #e8a87c;
    box-shadow: 0 0 0 3px rgba(232, 168, 124, 0.1);
}

/* No recipes message */
.no-recipes {
    text-align: center;
    padding: 4rem 2rem;
    background: white;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    grid-column: 1 / -1;
}

/* Recipe Cards */
.recipe-card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
    position: relative;
}

.recipe-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
}

.recipe-image {
    width: 100%;
    height: 200px;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 4rem;
    transition: transform 0.3s;
    background-color: #f5d6b3; /* цвет, если фото не загрузится */
}

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

.recipe-card:hover .recipe-image {
    transform: scale(1.02);
}

.recipe-content {
    padding: 1.5rem;
}

.recipe-content h3 {
    color: #2c1810;
    margin-bottom: 0.5rem;
    font-size: 1.2rem;
}

.recipe-content p {
    color: #666;
    line-height: 1.6;
    margin-bottom: 0.8rem;
}

.recipe-meta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    align-items: center;
    font-size: 0.9rem;
    color: #888;
}

.recipe-meta span {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.difficulty {
    display: inline-block;
    padding: 2px 12px;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: 600;
}

.difficulty.easy { 
    background: #d4edda; 
    color: #155724; 
}

.difficulty.medium { 
    background: #fff3cd; 
    color: #856404; 
}

.difficulty.hard { 
    background: #f8d7da; 
    color: #721c24; 
}


/* Общие стили для полей ввода */
.form-group {
    margin-bottom: 1.2rem;
}

.form-group label {
    display: block;
    font-weight: 600;
    color: #2c1810;
    margin-bottom: 0.4rem;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="url"],
.form-group input[type="search"],
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 10px 14px;
    border: 2px solid #e0d5cc;
    border-radius: 10px;
    background: #ffffff;
    font-size: 1rem;
    font-family: inherit;
    color: #2c1810;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

/* Фокус */
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #e8a87c;
    box-shadow: 0 0 0 3px rgba(232, 168, 124, 0.15);
}

/* Placeholder */
.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #b5a89c;
}

/* Textarea */
.form-group textarea {
    min-height: 90px;
    resize: vertical;
    line-height: 1.5;
}

/* Select */
.form-group select {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='%232c1810' d='M6 8L0 0h12z'/></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 36px;
}

/* Кнопки */
.form-group + button,
form button[type="submit"],
button.btn-primary {
    padding: 12px 28px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: background 0.2s, transform 0.1s;
}

/* Рейтинг-звёзды */
.rating-stars {
    display: flex;
    gap: 6px;
    font-size: 2rem;
    cursor: pointer;
    user-select: none;
    margin: 0.3rem 0 0.6rem;
}

.rating-stars span {
    opacity: 0.35;
    transition: opacity 0.15s, transform 0.15s;
    line-height: 1;
}

.rating-stars span:hover {
    transform: scale(1.15);
}

.rating-stars span.active,
.rating-stars span.active ~ span {
    opacity: 1;
}

/* Блок калькулятора кормления */
.calc-inputs .form-group {
    margin-bottom: 1rem;
}

.calc-inputs label {
    display: block;
    font-weight: 600;
    color: #2c1810;
    margin-bottom: 0.4rem;
}

.calc-inputs input,
.calc-inputs select {
    width: 100%;
    max-width: 320px;
    padding: 10px 14px;
    border: 2px solid #e0d5cc;
    border-radius: 10px;
    background: #fff;
    font-size: 1rem;
    font-family: inherit;
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.calc-inputs input:focus,
.calc-inputs select:focus {
    outline: none;
    border-color: #e8a87c;
    box-shadow: 0 0 0 3px rgba(232, 168, 124, 0.15);
}

.calc-inputs button {
    margin-top: 0.6rem;
    padding: 12px 28px;
    border-radius: 30px;
    background: #e8a87c;
    color: #2c1810;
    border: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, transform 0.1s;
}

.calc-inputs button:hover {
    background: #f5d6b3;
    transform: translateY(-1px);
}

/* Блок формы комментария */
.comment-form {
    background: #faf8f5;
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 1.5rem;
}

.comment-form h3 {
    color: #2c1810;
    margin-bottom: 1rem;
}

.rating-stars span.active {
    color: #f5a623;
    text-shadow: 0 0 8px rgba(245, 166, 35, 0.4);
}

.rating-stars span:hover,
.rating-stars span:hover ~ span {
    color: #f5a623;
    opacity: 0.8;
}


