@import url('https://fonts.googleapis.com/css2?family=Dancing+Script:wght@400;600;700&family=Crimson+Text:ital,wght@0,400;0,600;1,400&display=swap');

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Crimson Text', serif;
    background: linear-gradient(45deg, #f4f1e8, #ede6d3);
    background-attachment: fixed;
    color: #5a4a3a;
    line-height: 1.6;
    min-height: 100vh;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(circle at 20% 80%, rgba(139, 123, 89, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(160, 141, 105, 0.1) 0%, transparent 50%);
    pointer-events: none;
    z-index: -1;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 0 30px rgba(0,0,0,0.1);
    border-radius: 15px;
    margin-top: 20px;
    margin-bottom: 40px;
    border: 3px solid #d4c4a8;
}

/* Header Styles */
.header {
    text-align: center;
    margin-bottom: 40px;
    padding: 30px 20px;
    background: linear-gradient(135deg, #8b7b59, #a08d69);
    border-radius: 12px;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.2);
    position: relative;
}

.header::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px dashed #f4f1e8;
    border-radius: 8px;
    pointer-events: none;
}

.header h1 {
    font-family: 'Dancing Script', cursive;
    font-size: 3.5em;
    color: #f4f1e8;
    margin-bottom: 10px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    font-weight: 700;
}

.header .subtitle {
    font-size: 1.3em;
    color: #f4f1e8;
    font-style: italic;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
}

/* Navigation */
.navigation {
    background: #faf8f3;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 30px;
    border-left: 5px solid #8b7b59;
}

.nav-links {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    align-items: center;
}

.nav-links a {
    color: #5a4a3a;
    text-decoration: none;
    padding: 8px 15px;
    border-radius: 20px;
    transition: all 0.3s ease;
    font-weight: 600;
}

.nav-links a:hover {
    background: #8b7b59;
    color: #f4f1e8;
}

.nav-links a.home {
    background: #d4c4a8;
    color: #5a4a3a;
}

/* Era Introduction */
.era-intro {
    background: linear-gradient(135deg, #f4f1e8, #ede6d3);
    padding: 25px;
    border-radius: 12px;
    margin-bottom: 40px;
    border: 2px solid #d4c4a8;
}

.era-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.8em;
    color: #5a4a3a;
    text-align: center;
    margin-bottom: 10px;
    font-weight: 600;
}

.era-period {
    font-size: 1.3em;
    color: #8b7b59;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
    font-style: italic;
}

.era-description {
    font-size: 1.1em;
    text-align: center;
    line-height: 1.7;
    max-width: 800px;
    margin: 0 auto;
}

/* Recipe Grid */
.recipes-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 30px;
    margin-bottom: 40px;
}

/* Recipe Cards */
.recipe-card {
    background: linear-gradient(135deg, #faf8f3, #f0ebe0);
    border: 2px solid #d4c4a8;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.recipe-card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8b7b59, #a08d69, #8b7b59);
    z-index: -1;
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.recipe-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}

.recipe-card:hover::before {
    opacity: 1;
}

.recipe-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2em;
    color: #5a4a3a;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 600;
}

.recipe-subtitle {
    font-size: 1em;
    color: #8b7b59;
    text-align: center;
    margin-bottom: 20px;
    font-style: italic;
}

.recipe-description {
    font-size: 1em;
    margin-bottom: 20px;
    line-height: 1.6;
}

.recipe-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.recipe-detail {
    background: rgba(139, 123, 89, 0.1);
    padding: 8px 12px;
    border-radius: 6px;
    text-align: center;
}

.recipe-detail strong {
    color: #8b7b59;
}

.ingredients-preview {
    background: #faf8f3;
    padding: 15px;
    border-radius: 8px;
    border-left: 4px solid #8b7b59;
    margin-bottom: 15px;
}

.ingredients-preview h4 {
    font-family: 'Dancing Script', cursive;
    font-size: 1.4em;
    color: #5a4a3a;
    margin-bottom: 10px;
}

.ingredients-preview ul {
    list-style: none;
    font-size: 0.95em;
}

.ingredients-preview li {
    margin-bottom: 5px;
    padding-left: 15px;
    position: relative;
}

.ingredients-preview li::before {
    content: '✿';
    position: absolute;
    left: 0;
    color: #8b7b59;
}

.recipe-action {
    text-align: center;
}

.recipe-btn {
    background: #8b7b59;
    color: #f4f1e8;
    padding: 10px 20px;
    border: none;
    border-radius: 20px;
    font-size: 1em;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Crimson Text', serif;
    font-weight: 600;
}

.recipe-btn:hover {
    background: #5a4a3a;
    transform: scale(1.05);
}

/* Recipe Modal */
.recipe-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background: linear-gradient(135deg, #faf8f3, #f0ebe0);
    margin: 5% auto;
    padding: 30px;
    border: 3px solid #d4c4a8;
    border-radius: 15px;
    width: 90%;
    max-width: 800px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.close {
    color: #8b7b59;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: #5a4a3a;
}

.modal-recipe-title {
    font-family: 'Dancing Script', cursive;
    font-size: 2.5em;
    color: #5a4a3a;
    text-align: center;
    margin-bottom: 20px;
    font-weight: 600;
}

.modal-ingredients,
.modal-instructions {
    margin-bottom: 25px;
}

.modal-ingredients h3,
.modal-instructions h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8em;
    color: #5a4a3a;
    margin-bottom: 15px;
    font-weight: 600;
}

.modal-ingredients ul {
    list-style: none;
    background: #faf8f3;
    padding: 20px;
    border-radius: 8px;
    border-left: 4px solid #8b7b59;
}

.modal-ingredients li {
    margin-bottom: 8px;
    padding-left: 20px;
    position: relative;
}

.modal-ingredients li::before {
    content: '✿';
    position: absolute;
    left: 0;
    color: #8b7b59;
}

.modal-instructions ol {
    counter-reset: step-counter;
    list-style: none;
}

.modal-instructions li {
    margin-bottom: 15px;
    padding: 15px 15px 15px 50px;
    background: #faf8f3;
    border-radius: 8px;
    position: relative;
    counter-increment: step-counter;
}

.modal-instructions li::before {
    content: counter(step-counter);
    position: absolute;
    left: 15px;
    top: 15px;
    background: #8b7b59;
    color: #f4f1e8;
    width: 25px;
    height: 25px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9em;
}

.historical-note {
    background: linear-gradient(135deg, #ede6d3, #d4c4a8);
    padding: 20px;
    border-radius: 8px;
    margin-top: 20px;
    font-style: italic;
    border-left: 4px solid #8b7b59;
}

.historical-note h4 {
    font-family: 'Dancing Script', cursive;
    font-size: 1.4em;
    color: #5a4a3a;
    margin-bottom: 10px;
}

/* Footer Styles */
.footer {
    text-align: center;
    margin-top: 40px;
    padding: 25px;
    background: linear-gradient(135deg, #8b7b59, #a08d69);
    border-radius: 12px;
    color: #f4f1e8;
}

.footer-content {
    max-width: 600px;
    margin: 0 auto;
}

.footer h3 {
    font-family: 'Dancing Script', cursive;
    font-size: 1.8em;
    margin-bottom: 15px;
    font-weight: 600;
}

.footer p {
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 10px;
}

.footer-links {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 20px;
    flex-wrap: wrap;
}

.footer-links a {
    color: #f4f1e8;
    text-decoration: none;
    padding: 5px 10px;
    border-radius: 15px;
    transition: background 0.3s ease;
}

.footer-links a:hover {
    background: rgba(244, 241, 232, 0.2);
}

/* Responsive Design */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2.5em;
    }
    
    .container {
        margin: 10px;
        padding: 15px;
    }
    
    .recipes-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .nav-links {
        justify-content: center;
    }
    
    .recipe-details {
        grid-template-columns: 1fr;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
        padding: 20px;
    }
    
    .footer-links {
        flex-direction: column;
        align-items: center;
    }
}