/* Fix viewport height for mobile browsers */
:root {
    --app-height: 100dvh;
    --attribution-height: 34px;
    --cards-height: calc(var(--app-height) - calc(var(--attribution-height) * 2));
}

body {
    height: var(--app-height);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

#attribution {
    flex-shrink: 0;
    height: var(--attribution-height);
}

/* Hide scrollbar for cleaner mobile UI */
#recipe-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
    touch-action: pan-x;
    height: var(--cards-height);
    flex-shrink: 0;
}

#recipe-container::-webkit-scrollbar {
    display: none;
}

/* Recipe card styling */
.recipe-card {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    position: relative;
    height: var(--cards-height);
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: transform 0.2s ease;
}

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

/* Dark gradient overlay for text readability */
.recipe-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        to top,
        rgba(0, 0, 0, 0.9) 0%,
        rgba(0, 0, 0, 0.6) 30%,
        rgba(0, 0, 0, 0.2) 60%,
        transparent 100%
    );
}

/* Ensure content is above overlay */
.recipe-content {
    position: relative;
    z-index: 10;
}

/* Text shadows for better visibility */
.recipe-title {
    font-family: gelica, sans-serif;
font-weight: 700;
font-style: normal;
}

.recipe-ingredients {
    text-shadow: 1px 1px 4px rgba(0, 0, 0, 0.8),
                 0 0 10px rgba(0, 0, 0, 0.6);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Smooth scrolling */
#recipe-container {
    scroll-behavior: smooth;
}

