@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;700&display=swap');

:root {
    /* Match the goat image background exactly to blend seamlessly */
    --bg-color: #85d5c7;
    --sidebar-width: 320px;
    
    /* Lighter Slate/Teal for the top nav */
    --dark-accent: #23403c;
    /* Medium slate for borders and grids */
    --dark-accent-light: rgba(35, 64, 60, 0.15);
    --dark-accent-medium: rgba(35, 64, 60, 0.4);
}

body,
html {
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    height: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

/* Full width header: architectural draft aesthetic */
.top-nav {
    height: 70px;
    background-color: var(--dark-accent);
    width: 100%;
    z-index: 20;
    border-bottom: 3px solid var(--bg-color);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem; /* reduced padding slightly */
    color: var(--bg-color);
    font-family: 'Inter', sans-serif;
    box-sizing: border-box; /* prevent overflow */
}

.nav-brand {
    font-weight: 700;
    letter-spacing: 3px;
    font-size: 1.1rem;
    text-transform: uppercase;
    white-space: nowrap;
}

.nav-meta {
    font-weight: 300;
    letter-spacing: 2px;
    font-size: 0.85rem;
    opacity: 0.7;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* The flex container for the remaining layout */
.layout-body {
    display: flex;
    flex-grow: 1;
    position: relative;
}

/* Sidebar acting as the 'building' support */
.sidebar {
    width: var(--sidebar-width);
    flex-shrink: 0; /* ensure sidebar doesn't compress */
    border-right: 2px solid var(--dark-accent-medium);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    z-index: 5;
    background: linear-gradient(180deg, var(--dark-accent-light) 0%, transparent 100%);
}

/* Essential main content area ('under construction' feel) */
.main-content {
    flex-grow: 1;
    position: relative;
    background-image:
        linear-gradient(var(--dark-accent-light) 1px, transparent 1px),
        linear-gradient(90deg, var(--dark-accent-light) 1px, transparent 1px);
    background-size: 50px 50px;
}

/* The goat, offset but not touching the edges */
.goat-container {
    position: absolute;
    bottom: 30px; /* Floating up from the bottom */
    left: 50px;   /* Pushed in from the left */
    z-index: 10;
}

.hero-image {
    width: 420px; /* slightly smaller to fit the float */
    height: auto;
    object-fit: contain;
    mix-blend-mode: multiply;
    /* Helps blend the image background with ours */
    filter: drop-shadow(15px 15px 25px rgba(35, 64, 60, 0.3));
    transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    transform-origin: bottom left;
}

.hero-image:hover {
    transform: scale(1.03) rotate(2deg) translateY(-10px);
}

/* Grass elements styled as abstract grid tiles */
.grass-patch {
    position: absolute;
    width: 49px; /* 1px smaller to fit inside the 50x50 grid line */
    height: 49px;
    /* Deep slate with a strong blend of dark field green */
    background-color: #1a3a2f; 
    border: 1px solid rgba(0, 50, 20, 0.4);
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.5), 0 5px 15px rgba(26, 58, 47, 0.3);
    cursor: pointer;
    z-index: 50; /* high z-index to stay above background and grid */
    transition: transform 0.2s ease, opacity 0.5s ease, background-color 0.2s ease, box-shadow 0.2s ease;
    border-radius: 4px; /* Slight rounding so it isn't completely harsh */
    opacity: 0.85;
}

.grass-patch:hover {
    transform: scale(1.05);
    /* Brightens up to a slightly more visible green on hover */
    background-color: #235442;
    box-shadow: inset 0 0 15px rgba(0, 0, 0, 0.6), 0 8px 20px rgba(26, 58, 47, 0.5);
    opacity: 1;
}

/* The shaking/eating animation class */
.goat-eating {
    animation: goatShake 0.4s ease-in-out;
}

@keyframes goatShake {
    0% { transform: rotate(0deg) translateY(0); }
    25% { transform: rotate(-3deg) translateY(5px); }
    50% { transform: rotate(3deg) translateY(-2px); }
    75% { transform: rotate(-2deg) translateY(3px); }
    100% { transform: rotate(0deg) translateY(0); }
}
