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

body { 
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #0f0a00; 
    color: #f3f0eb; 
    overflow: hidden;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

#app {
    display: flex;
    flex-direction: column;
    flex: 1;
    overflow: hidden;
}

.container { display: flex; flex: 1; overflow: hidden; }

.sidebar { 
    width: 320px; 
    background: #1a1008; 
    border-right: 1px solid #3d2b1f; 
    overflow-y: auto;
}

.sidebar-header { 
    padding: 1rem; 
    border-bottom: 1px solid #3d2b1f; 
    position: sticky; 
    top: 0; 
    background: #1a1008; 
    z-index: 10;
}

.main-content { 
    flex: 1; 
    display: flex; 
    flex-direction: column; 
    overflow: hidden;
}

.top-bar { 
    background: #1a1008; 
    border-bottom: 1px solid #3d2b1f; 
    padding: 1rem;
}

.content-area { 
    flex: 1; 
    overflow-y: auto; 
    padding: 1.5rem;
}

.recipe-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); 
    gap: 1.5rem;
}

.recipe-card { 
    background: #1a1008; 
    border-radius: 0.5rem; 
    border: 1px solid #3d2b1f; 
    overflow: hidden;
    transition: all 0.3s;
}

.recipe-card:hover { box-shadow: 0 0 20px rgba(247, 105, 0, 0.25); }

.recipe-image-container { 
    position: relative; 
    background: #0f0a00; 
    height: 300px; 
    display: flex; 
    align-items: center; 
    justify-content: center;
}

.recipe-image { 
    transform: rotate(-90deg); 
    -webkit-transform: rotate(-90deg); 
    object-fit: contain; 
    max-width: 100%; 
    max-height: 100%;
}

.recipe-image-detail { 
    transform: rotate(-90deg); 
    -webkit-transform: rotate(-90deg); 
    max-width: 75%; 
    max-height: 75vh; 
    object-fit: contain;
}

.btn { 
    padding: 0.5rem 1rem; 
    border-radius: 0.5rem; 
    border: none; 
    cursor: pointer; 
    font-weight: 500;
    transition: all 0.2s;
}

/* Syracuse Orange as primary */
.btn-primary { background: #f76900; color: white; }
.btn-primary:hover { background: #d45c00; }

/* Autumn green → warm amber for confirm actions */
.btn-green { background: #b45309; color: white; }
.btn-green:hover { background: #92400e; }

.btn-red { background: #dc2626; color: white; }
.btn-red:hover { background: #b91c1c; }

/* Purple → burnt sienna */
.btn-purple { background: #c2410c; color: white; }
.btn-purple:hover { background: #9a3412; }

.btn-gray { background: #3d2b1f; color: #d6c9bc; }
.btn-gray:hover { background: #52392a; }

.input { 
    width: 100%; 
    padding: 0.5rem 1rem; 
    background: #0f0a00; 
    border: 1px solid #3d2b1f; 
    border-radius: 0.5rem; 
    color: #f3f0eb;
    outline: none;
}

.input:focus { border-color: #f76900; box-shadow: 0 0 0 2px rgba(247, 105, 0, 0.2); }

.badge { 
    display: inline-block; 
    padding: 0.25rem 0.5rem; 
    border-radius: 9999px; 
    font-size: 0.75rem; 
    font-weight: 600;
}

.modal { 
    position: fixed; 
    inset: 0; 
    background: rgba(0,0,0,0.8); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    z-index: 50; 
    padding: 1rem;
}

.modal-content { 
    background: #1a1008; 
    border-radius: 0.5rem; 
    max-width: 56rem; 
    width: 100%; 
    max-height: 90vh; 
    overflow-y: auto; 
    border: 1px solid #3d2b1f;
}

.line-clamp-2 { 
    display: -webkit-box; 
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical; 
    overflow: hidden;
}

.tag { 
    position: absolute; 
    top: 0.5rem; 
    padding: 0.25rem 0.5rem; 
    font-size: 0.75rem; 
    font-weight: 600; 
    border-radius: 9999px; 
    color: white;
}

.tag-left { left: 0.5rem; }
.tag-right { right: 0.5rem; }

.checkbox { width: 1rem; height: 1rem; cursor: pointer; accent-color: #f76900; }

.fav-btn { 
    padding: 0.5rem; 
    border-radius: 9999px; 
    border: none; 
    cursor: pointer; 
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
    transition: transform 0.2s;
}

.fav-btn:hover { transform: scale(1.1); }

.step-number { 
    width: 2rem; 
    height: 2rem; 
    background: #f76900; 
    color: white; 
    border-radius: 9999px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: 700; 
    flex-shrink: 0;
}

select { 
    padding: 0.5rem 0.75rem; 
    background: #3d2b1f; 
    color: #f3f0eb; 
    border: none; 
    border-radius: 0.5rem; 
    font-size: 0.875rem;
    cursor: pointer;
}

textarea { 
    width: 100%; 
    padding: 0.75rem; 
    background: #0f0a00; 
    border: 1px solid #3d2b1f; 
    border-radius: 0.5rem; 
    color: #f3f0eb; 
    resize: vertical;
    font-family: inherit;
}

textarea:focus { 
    outline: none; 
    border-color: #f76900; 
    box-shadow: 0 0 0 2px rgba(247, 105, 0, 0.2); 
}

/* Calendar Styles */
.calendar-container {
    background: #0f0a00;
    border: 1px solid #3d2b1f;
    border-radius: 0.5rem;
    padding: 1rem;
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #3d2b1f;
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.5rem;
}

.calendar-day-header {
    text-align: center;
    font-size: 0.75rem;
    font-weight: 600;
    color: #a08060;
    padding: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 0.25rem;
    font-size: 0.875rem;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    position: relative;
}

.calendar-day:not(.calendar-day-empty):not(.calendar-day-other-month):hover {
    background: #3d2b1f;
}

.calendar-day-empty { cursor: default; }
.calendar-day-other-month { color: #52392a; cursor: default; }

.calendar-day-today {
    background: #7c2d00;
    font-weight: 700;
}

.calendar-day-has-recipe {
    background: #92400e;
    font-weight: 600;
}

.calendar-day-has-recipe:hover { background: #b45309; }

.calendar-day-selectable:hover {
    border-color: #f76900;
    background: #7c2d00;
}

/* Scrollbars */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #0f0a00; }
::-webkit-scrollbar-thumb { background: #52392a; border-radius: 999px; }
::-webkit-scrollbar-thumb:hover { background: #f76900; }

/* App Footer */
.app-footer {
    text-align: center;
    padding: 1rem;
    border-top: 1px solid #3d2b1f;
    color: #a08060;
    font-size: 0.75rem;
    background: #0f0a00;
    flex-shrink: 0;
}

.app-footer a {
    color: #f76900;
    text-decoration: none;
}

.app-footer a:hover { text-decoration: underline; }

.footer-emoji {
    font-size: 0.7rem;
    letter-spacing: 0.1em;
    opacity: 0.6;
    margin-bottom: 0.25rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    body {
        overflow: auto;
        height: auto;
        min-height: 100vh;
        flex-direction: column;
    }

    #app {
        overflow: visible;
        height: auto;
        flex: none;
    }

    .container {
        flex-direction: column;
        height: auto;
        overflow: visible;
        flex: none;
    }

    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #3d2b1f;
        max-height: 40vh;
        overflow-y: auto;
    }

    .main-content {
        flex: none;
        overflow: visible;
        height: auto;
    }

    .top-bar {
        padding: 0.75rem;
        position: sticky;
        top: 0;
        z-index: 20;
        background: #1a1008;
    }

    .top-bar h1 { font-size: 1.125rem; }

    .top-bar > div:last-child {
        display: flex;
        flex-wrap: wrap;
        gap: 0.375rem;
    }

    .top-bar .btn, .top-bar select {
        font-size: 0.75rem;
        padding: 0.375rem 0.625rem;
    }

    .content-area {
        overflow: visible;
        height: auto;
        padding: 0.75rem;
        flex: none;
    }

    .recipe-grid {
        grid-template-columns: 1fr;
    }

    .grid-3 { grid-template-columns: repeat(2, 1fr); }
    .grid-2 { grid-template-columns: 1fr; }

    .modal {
        padding: 0;
        align-items: flex-end;
    }

    .modal-content {
        max-height: 92vh;
        border-radius: 1rem 1rem 0 0;
        overflow-y: auto;
    }

    .app-footer {
        position: static;
    }
}

/* Utility Classes */
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 0.5rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; }
.flex { display: flex; }
.flex-col { flex-direction: column; }
.items-center { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 0.75rem; }
.mb-4 { margin-bottom: 1rem; }
.mb-6 { margin-bottom: 1.5rem; }
.mt-4 { margin-top: 1rem; }
.p-2 { padding: 0.5rem; }
.p-3 { padding: 0.75rem; }
.p-4 { padding: 1rem; }
.p-6 { padding: 1.5rem; }
.text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }
.text-xl { font-size: 1.25rem; }
.text-2xl { font-size: 1.5rem; }
.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.text-center { text-align: center; }
.rounded { border-radius: 0.25rem; }
.rounded-lg { border-radius: 0.5rem; }
.rounded-full { border-radius: 9999px; }
.border { border: 1px solid #3d2b1f; }
.border-t { border-top: 1px solid #3d2b1f; }
.border-b { border-bottom: 1px solid #3d2b1f; }
.w-full { width: 100%; }
.hidden { display: none; }
.relative { position: relative; }
.absolute { position: absolute; }
.sticky { position: sticky; }
.top-0 { top: 0; }
.space-y-2 > * + * { margin-top: 0.5rem; }
.space-y-4 > * + * { margin-top: 1rem; }