/* General Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Georgia', 'Times New Roman', serif;
    line-height: 1.6;
    color: #2c3e50;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 20px;
}

/* Header Styles */
header {
    background: linear-gradient(135deg, #c94b4b 0%, #4b134f 100%);
    color: white;
    text-align: center;
    padding: 40px 20px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    margin-bottom: 30px;
}

header h1 {
    font-size: 3em;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.subtitle {
    font-size: 1.3em;
    font-style: italic;
    opacity: 0.95;
}

/* Main Content Container */
main {
    max-width: 1200px;
    margin: 0 auto;
}

/* Section Styles */
.menu-section, .shopping-list, .timeline-section, .tips-section {
    background: white;
    border-radius: 12px;
    padding: 30px;
    margin-bottom: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

.menu-section h2, .shopping-list h2, .timeline-section h2, .tips-section h2 {
    color: #c94b4b;
    font-size: 2.2em;
    margin-bottom: 25px;
    border-bottom: 3px solid #c94b4b;
    padding-bottom: 10px;
}

/* Dinner and Breakfast Specific Colors */
.dinner h2 {
    color: #8b4513;
    border-bottom-color: #8b4513;
}

.breakfast h2 {
    color: #ff8c00;
    border-bottom-color: #ff8c00;
}

/* Dish Cards */
.dish {
    background: #f9f9f9;
    border-left: 5px solid #c94b4b;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 8px;
    transition: transform 0.2s, box-shadow 0.2s;
}

.dinner .dish {
    border-left-color: #8b4513;
}

.breakfast .dish {
    border-left-color: #ff8c00;
}

.dish:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.dish h3 {
    color: #2c3e50;
    font-size: 1.8em;
    margin-bottom: 15px;
}

.servings {
    background: #e8f5e9;
    color: #2e7d32;
    padding: 8px 15px;
    border-radius: 20px;
    display: inline-block;
    font-weight: bold;
    margin-bottom: 15px;
    font-size: 0.95em;
}

.recipe-details h4 {
    color: #555;
    font-size: 1.2em;
    margin: 15px 0 10px 0;
}

/* Ingredients List */
.ingredients {
    list-style: none;
    padding-left: 0;
}

.ingredients li {
    padding: 8px 0;
    padding-left: 30px;
    position: relative;
    font-size: 1.05em;
}

.ingredients li::before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #4caf50;
    font-weight: bold;
    font-size: 1.2em;
}

.ingredients li strong {
    color: #c94b4b;
}

.note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px;
    margin-top: 15px;
    font-style: italic;
    border-radius: 4px;
}

/* Shopping List */
.shopping-categories {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.shopping-category {
    background: #f5f5f5;
    padding: 20px;
    border-radius: 8px;
    border-top: 4px solid #667eea;
}

.shopping-category h3 {
    color: #667eea;
    margin-bottom: 15px;
    font-size: 1.4em;
}

.shopping-category ul {
    list-style: none;
    padding-left: 0;
}

.shopping-category ul li {
    padding: 6px 0;
    padding-left: 25px;
    position: relative;
}

.shopping-category ul li::before {
    content: "🛒";
    position: absolute;
    left: 0;
}

/* Cost Section Styles */
.cost-section h2 {
    color: #d32f2f;
    border-bottom-color: #d32f2f;
}

.cost-note {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.cost-categories {
    display: grid;
    gap: 25px;
    margin-bottom: 30px;
}

.cost-category h3 {
    color: #5d4037;
    font-size: 1.4em;
    margin-bottom: 15px;
    font-weight: 700;
}

.cost-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border-radius: 8px;
    overflow: hidden;
}

.cost-table thead {
    background: linear-gradient(135deg, #43a047 0%, #2e7d32 100%);
    color: white;
}

.cost-table thead th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 1em;
}

.cost-table tbody tr {
    border-bottom: 1px solid #e0e0e0;
}

.cost-table tbody tr:last-child {
    border-bottom: none;
}

.cost-table tbody tr:hover {
    background: #f5f5f5;
}

.cost-table tbody td {
    padding: 10px 12px;
    font-size: 0.95em;
}

.cost-table tbody td:first-child {
    font-weight: 500;
}

.editable {
    background: #fffde7;
    font-family: 'Courier New', monospace;
    font-weight: 600;
    color: #f57c00;
    text-align: center;
}

.total-cell {
    font-family: 'Courier New', monospace;
    font-weight: 600;
    text-align: right;
    color: #1976d2;
    min-width: 100px;
}

.subtotal-row {
    background: #e8f5e9 !important;
    border-top: 2px solid #2e7d32 !important;
    border-bottom: 2px solid #2e7d32 !important;
}

.subtotal-row td {
    padding: 12px !important;
}

.grand-total {
    background: linear-gradient(135deg, #f3f4f6 0%, #e5e7eb 100%);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.grand-total h3 {
    color: #c62828;
    font-size: 1.8em;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 700;
}

.summary-table {
    max-width: 500px;
    margin: 0 auto;
}

.summary-table tbody tr {
    background: white;
}

.summary-table tbody td {
    padding: 12px 20px;
    font-size: 1.05em;
}

.grand-total-row {
    background: #1976d2 !important;
    color: white !important;
    border-top: 3px solid #0d47a1 !important;
}

.grand-total-row td {
    color: white !important;
    font-size: 1.3em !important;
    padding: 15px 20px !important;
}

.per-person-row {
    background: #4caf50 !important;
    color: white !important;
}

.per-person-row td {
    color: white !important;
    font-size: 1.1em !important;
}

.free-item {
    color: #4caf50 !important;
    font-style: italic;
}

.savings-note {
    margin-top: 20px;
    padding: 15px;
    background: #e8f5e9;
    border-left: 4px solid #4caf50;
    border-radius: 6px;
    text-align: center;
    color: #2e7d32;
    font-size: 1.05em;
}

/* Timeline Styles */
.timeline-note {
    background: #e3f2fd;
    border-left: 4px solid #2196f3;
    padding: 12px;
    margin-bottom: 20px;
    border-radius: 4px;
}

.timeline h3 {
    color: #4b134f;
    font-size: 1.6em;
    margin: 25px 0 15px 0;
    padding-top: 15px;
    border-top: 2px dashed #ccc;
}

.timeline h3:first-child {
    border-top: none;
    padding-top: 0;
    margin-top: 0;
}

.timeline-day {
    position: relative;
    padding-left: 40px;
    border-left: 3px solid #667eea;
    margin-left: 120px;
}

.timeline-item {
    position: relative;
    margin-bottom: 30px;
    background: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    transition: all 0.3s;
}

.timeline-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.timeline-item::before {
    content: "";
    position: absolute;
    left: -47px;
    top: 20px;
    width: 15px;
    height: 15px;
    border-radius: 50%;
    background: #667eea;
    border: 3px solid white;
    box-shadow: 0 0 0 3px #667eea;
}

.timeline-item.prep::before {
    background: #4caf50;
    box-shadow: 0 0 0 3px #4caf50;
}

.timeline-item.serve::before {
    background: #ff5722;
    box-shadow: 0 0 0 3px #ff5722;
}

.time {
    position: absolute;
    left: -190px;
    top: 18px;
    font-weight: bold;
    color: #667eea;
    font-size: 1.2em;
    width: 140px;
    text-align: right;
}

.task strong {
    color: #2c3e50;
    font-size: 1.15em;
    display: block;
    margin-bottom: 10px;
}

.task ul {
    margin-left: 20px;
    margin-top: 8px;
}

.task ul li {
    margin: 5px 0;
    color: #555;
}

.timeline-item.prep .task strong {
    color: #4caf50;
}

.timeline-item.serve .task strong {
    color: #ff5722;
    font-size: 1.3em;
}

/* Tips Section */
.tips {
    display: grid;
    gap: 15px;
}

.tip {
    background: #f0f4ff;
    border-left: 5px solid #667eea;
    padding: 15px 20px;
    border-radius: 6px;
}

.tip strong {
    color: #667eea;
    display: block;
    margin-bottom: 5px;
}

/* Footer */
footer {
    text-align: center;
    color: white;
    padding: 30px 20px;
    margin-top: 20px;
    font-size: 1.1em;
}

footer p {
    margin: 10px 0;
}

.disclaimer {
    font-size: 0.9em;
    opacity: 0.9;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 768px) {
    header h1 {
        font-size: 2em;
    }
    
    .subtitle {
        font-size: 1.1em;
    }
    
    .menu-section, .shopping-list, .timeline-section, .tips-section {
        padding: 20px;
    }
    
    .timeline-day {
        margin-left: 20px;
        padding-left: 30px;
    }
    
    .time {
        position: relative;
        left: 0;
        top: 0;
        text-align: left;
        margin-bottom: 10px;
        width: auto;
        display: block;
    }
    
    .timeline-item::before {
        left: -37px;
    }
    
    .shopping-categories {
        grid-template-columns: 1fr;
    }
}

@media print {
    body {
        background: white;
        padding: 0;
    }
    
    header {
        background: #c94b4b;
        -webkit-print-color-adjust: exact;
        print-color-adjust: exact;
    }
    
    .menu-section, .shopping-list, .timeline-section, .tips-section {
        box-shadow: none;
        page-break-inside: avoid;
    }
}
