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

body {
    font-family: 'Roboto', sans-serif;
    color: white;
    min-height: 100vh;
    overflow-y: auto;
    background: black; 
    display: flex;
    flex-direction: column;
}

.bg-image {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 1;
}

.overlay {
    position: fixed; 
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0, 0, 0, 0.7); 
    z-index: 2;
}

header, main {
    z-index: 10; 
    position: relative;
}

header {
    display: grid;
    grid-template-columns: 1fr auto 1fr; 
    align-items: center;
    padding: 20px 40px;
    width: 100%;
}

.header-left { justify-self: start; }
.header-right { justify-self: end; display: flex; gap: 20px; }

.logo img { height: 50px; display: block; }

.socials {
    display: flex;
    gap: 20px;
    align-items: center;
}

.socials a {
    color: white; 
    display: flex; 
    align-items: center;
    justify-content: center;
    opacity: 0.8;
    transition: opacity 0.3s, transform 0.3s;
    width: 24px;
    height: 24px;
}

.socials a svg {
    width: 100%;
    height: 100%;
}

.socials a:hover { 
    opacity: 1; 
    transform: scale(1.1); 
}

nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
    padding: 0; margin: 0;
}

nav a {
    text-decoration: none;
    color: white;
    font-family: 'Source Code Pro', monospace;
    font-size: 14px;
    letter-spacing: 3px;
    text-transform: uppercase;
    border-bottom: 2px solid transparent;
    padding-bottom: 5px;
    transition: border-color 1s;
}

nav a:hover, nav a.active {
    border-bottom: 2px solid white;
}

.mobile-socials { display: none; }

.nav-toggle {
    position: absolute;
    left: -9999px;
    opacity: 0;
}
.nav-toggle-label { display: none; }

main {
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
    width: 100%;
}

h1 {
    font-size: 4rem;
    margin-bottom: 10px;
    font-weight: 700;
    letter-spacing: 1px;
    color: white; 
}

.recipe-link {
    font-size: 4rem; 
    font-weight: 700;
    color: #cccccc; 
    text-decoration: none;
    margin-bottom: 50px;
    display: block;
    line-height: 1.1;
    max-width: 1400px;
    width: 100%;
    text-wrap: balance;
    padding: 0 20px;
    transition: color 0.4s ease; 
}

.recipe-link:hover {
    color: #ffffff; 
    text-shadow: none; 
    transform: none;
}

.refresh-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 18px 35px;
    border: 2px solid #f3ffa2;
    border-radius: 50px;
    color: white;
    text-decoration: none;
    font-family: 'Source Code Pro', monospace;
    font-weight: 600;
    font-size: 1rem;
    overflow: hidden;
    transition: background-color 0.3s ease, color 0.3s ease;
    margin-bottom: 30px; 
}

.refresh-btn .arrow {
    opacity: 0;
    max-width: 0;
    white-space: nowrap;
    transform: translateX(-10px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    display: inline-block;
    margin-left: 0;
}

.refresh-btn:hover {
    background: #f3ffa2;
    color: #000;
}

.refresh-btn:hover .arrow {
    opacity: 1;
    max-width: 20px; 
    transform: translateX(0);
    margin-left: 10px; 
}

.about-content {
    max-width: 800px;  
    width: 90%;        
    margin: 40px auto;
    text-align: left; 
}

.about-content h1 {
    font-size: 2.5rem;
    margin-bottom: 20px;
    color: #f3ffa2; 
    text-transform: none; 
    text-shadow: 0 2px 4px rgba(0,0,0,0.5);
}

.about-content p {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 20px;
    color: #eeeeee;
    text-shadow: 0 1px 2px rgba(0,0,0,0.5);
}

@media (max-width: 768px) {
    header {
        display: flex; 
        justify-content: space-between;
        padding: 20px;
        position: relative;
        z-index: 500;
    }
    
    .header-right { display: none; } 
    
    h1 { font-size: 2.5rem; }
    .recipe-link { font-size: 2.5rem; margin-bottom: 30px; }

    .nav-toggle-label {
        display: block;
        cursor: pointer;
        padding: 15px;
        position: relative; 
        z-index: 600;
        -webkit-tap-highlight-color: transparent;
    }
    
    .nav-toggle-label span, 
    .nav-toggle-label span::before, 
    .nav-toggle-label span::after {
        display: block;
        background: white;
        height: 2px;
        width: 25px;
        position: relative;
        transition: all 0.3s;
    }
    .nav-toggle-label span::before,
    .nav-toggle-label span::after {
        content: '';
        position: absolute;
    }
    .nav-toggle-label span::before { bottom: 8px; }
    .nav-toggle-label span::after { top: 8px; }

    #nav-toggle:checked ~ .nav-toggle-label span { background: transparent; }
    #nav-toggle:checked ~ .nav-toggle-label span::before { bottom: 0; transform: rotate(45deg); }
    #nav-toggle:checked ~ .nav-toggle-label span::after { top: 0; transform: rotate(-45deg); }

    nav {
        position: fixed; 
        top: 0; left: 0; 
        width: 100%; height: 100vh; 
        background: black; 
        z-index: 550;
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        opacity: 0;
        visibility: hidden;
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }
    
    nav ul {
        flex-direction: column;
        text-align: center;
        gap: 40px;
    }

    nav a { 
        font-size: 1.5rem; 
        display: block; 
        padding: 15px;
    }

    .mobile-socials {
        display: flex;
        margin-top: 50px;
        gap: 20px;
    }
    .mobile-socials a { font-size: 1.2rem; }
    
    #nav-toggle:checked ~ nav {
        opacity: 1;
        visibility: visible;
    }

    .about-content {
        padding: 0;
        width: 95%; 
        margin-bottom: 50px;
    }
    .about-content h1 {
        font-size: 2rem;
    }
}