:root {
    --saddle-brown: #8B4513;
    --light-peach: #FFDDC1;
    --burly-wood: #DEB887;
}
html { height: 100%; }
body {
    font-family: 'Inter', sans-serif;
    user-select: none;
    background-color: var(--light-peach);
    background-image:
        radial-gradient(var(--saddle-brown) 15%, transparent 16%),
        radial-gradient(var(--saddle-brown) 15%, transparent 16%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    display: flex;
    flex-direction: column;
    min-height: 100%;
    touch-action: manipulation;
}
@media (min-width: 768px) {
    body {
        justify-content: center;
        align-items: center;
        padding: 1rem;
    }
}
.funky-font {
    font-family: 'Luckiest Guy', cursive;
    letter-spacing: 2px;
    text-shadow: 2px 2px 0px rgba(0,0,0,0.1);
}
.floating-insult {
  position: absolute;
  z-index: 1000;
  color: #b91c1c;
  font-size: 2rem;
  font-family: 'Comic Sans MS', cursive, sans-serif;
  pointer-events: none;
  left: 50%; /* fallback, will be overwritten by JS */
  top: 10px;
  transform: translateX(-50%);
  animation: floatUp 1.2s ease-out forwards;
  white-space: nowrap;
}
@keyframes floatUp {
  0% { opacity: 1; transform: translateY(0); }
  100% { opacity: 0; transform: translateY(-80px);}
}
.chicken-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    max-width: 300px;
    flex-grow: 1;
}
.chicken {
    cursor: pointer;
    transition: transform 0.1s ease-out;
    width: 100%;
    height: auto;
    filter: drop-shadow(5px 5px 10px rgba(0,0,0,0.3));
}
.chicken:active { transform: scale(0.95) rotate(-2deg); }
.floating-text {
    position: absolute;
    font-family: 'Luckiest Guy', cursive;
    font-size: 2.5rem;
    color: #FFD700;
    text-shadow: 2px 2px 0 #000, -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000;
    pointer-events: none;
    animation: floatUp 1.5s ease-out forwards;
}
.super-click-text {
     font-size: 3.5rem;
     color: #f472b6; /* Pink */
}
@keyframes floatUp {
    from { opacity: 1; transform: translateY(0) rotate(0deg); }
    to { opacity: 0; transform: translateY(-120px) rotate(15deg); }
}
.golden-chicken, .colored-egg {
    position: absolute; /* Contained within app-wrapper */
    cursor: pointer;
    transition: transform 0.2s, opacity 0.5s;
    z-index: 100;
    display: none;
}
.golden-chicken {
    width: 80px; height: 80px;
    animation: shimmer 1.5s infinite;
    filter: drop-shadow(0 0 15px gold);
}
.colored-egg {
    width: 40px; height: 50px;
    animation: pulse 2s infinite;
}
@keyframes pulse { 0%, 100% { transform: scale(1); } 50% { transform: scale(1.1); } }
.golden-chicken:hover { transform: scale(1.2) rotate(10deg); }
@keyframes shimmer {
    0% { filter: brightness(1) drop-shadow(0 0 15px gold); }
    50% { filter: brightness(1.7) drop-shadow(0 0 25px gold); }
    100% { filter: brightness(1) drop-shadow(0 0 15px gold); }
}
.achievement-toast {
    position: fixed;
    bottom: 80px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(45deg, #f3ec78, #af4261);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    z-index: 1100; /* Above modals */
    opacity: 0;
    transition: all 0.5s cubic-bezier(0.68, -0.55, 0.27, 1.55);
    pointer-events: none;
    border: 4px solid white;
    box-shadow: 0 10px 20px rgba(0,0,0,0.2);
    max-width: 90%;
    text-align: center;
}
.achievement-toast.show { opacity: 1; transform: translateX(-50%) translateY(-20px) scale(1); }
.game-card {
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border: 5px solid var(--saddle-brown);
    border-radius: 20px;
    box-shadow: 0 10px 15px rgba(0,0,0,0.2);
}
.funky-button {
    border-radius: 12px;
    font-weight: bold;
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
    transition: all 0.2s ease-in-out;
    border-bottom: 4px solid rgba(0,0,0,0.2);
    text-transform: uppercase;
}
.funky-button:hover { transform: translateY(-2px); filter: brightness(1.1); }
.funky-button:active { transform: translateY(1px); border-bottom-width: 2px; }
.funky-button:disabled { background-color: #9ca3af !important; color: #e5e7eb !important; cursor: not-allowed; border-bottom-color: #6b7280; transform: translateY(0); filter: brightness(1); }

.modal-screen {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.5);
    backdrop-filter: blur(5px);
    z-index: 1000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}
.modal-content {
    width: 100%; max-width: 500px;
    height: 90%; max-height: 700px;
    background-color: var(--light-peach);
    border-radius: 20px;
    border: 8px solid var(--saddle-brown);
    padding: 1rem;
    position: relative;
    display: flex;
    flex-direction: column;
}
.modal-body {
    overflow-y: auto;
    flex-grow: 1;
    padding-right: 0.5rem;
}
.close-modal-btn {
    position: absolute;
    top: -15px; right: -15px;
    width: 40px; height: 40px;
    background: var(--saddle-brown);
    color: white;
    border-radius: 50%;
    border: 4px solid white;
    display: flex; justify-content: center; align-items: center;
    font-weight: bold; font-size: 1.5rem;
    cursor: pointer;
    z-index: 10;
}
.bottom-nav {
    position: fixed;
    bottom: 0; left: 0;
    width: 100%; height: 65px;
    background-color: var(--saddle-brown);
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -5px 15px rgba(0,0,0,0.2);
    z-index: 50;
}
.nav-button {
    background: none; border: none;
    color: white;
    display: flex; flex-direction: column; align-items: center;
    font-size: 0.75rem; font-weight: bold;
    cursor: pointer;
    padding: 0.5rem; border-radius: 8px;
    transition: background-color 0.2s;
}
.nav-button:hover { background-color: rgba(255,255,255,0.2); }
.nav-button svg { width: 28px; height: 28px; margin-bottom: 2px; }
#event-banner {
    display: none;
    position: absolute; /* Contained within wrapper */
    top: 0; left: 0;
    width: 100%;
    background: linear-gradient(45deg, #fceabb, #f8b500);
    color: #333;
    text-align: center;
    padding: 0.5rem;
    z-index: 500;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
}
#achievement-screenshot-template {
    position: absolute;
    left: -9999px; top: -9999px;
    width: 500px; padding: 20px;
    background-color: var(--light-peach);
    background-image:
        radial-gradient(var(--saddle-brown) 15%, transparent 16%),
        radial-gradient(var(--saddle-brown) 15%, transparent 16%);
    background-size: 60px 60px;
    background-position: 0 0, 30px 30px;
    border: 10px solid var(--saddle-brown);
    border-radius: 15px;
    color: white;
}
/* Help modal specific styles */
#help-screen .modal-body h3, #settings-screen .changelog-details h4 {
    font-family: 'Luckiest Guy', cursive;
    font-size: 1.75rem;
    color: var(--saddle-brown);
    margin-top: 1rem;
    margin-bottom: 0.5rem;
    border-bottom: 3px solid var(--burly-wood);
    padding-bottom: 0.25rem;
    line-height: 1.4;
}
#help-screen .modal-body p, #settings-screen .changelog-details ul {
    margin-bottom: 0.75rem;
    line-height: 1.6;
}
#help-screen .modal-body strong {
    color: var(--saddle-brown);
}

.achievement-progress-bar {
    background-color: #e5e7eb; /* gray-200 */
    border-radius: 9999px;
    height: 0.75rem;
    margin-top: 0.5rem;
    overflow: hidden;
    border: 1px solid #d1d5db; /* gray-300 */
}

.achievement-progress {
    background-color: #22c55e; /* green-500 */
    height: 100%;
    border-radius: 9999px;
    transition: width 0.3s ease-in-out;
}

.egg-effects-banner {
  display: flex;
  gap: 8px;
  justify-content: center;
  align-items: center;
  margin: 8px 0;
  font-size: 1.1rem;
  font-weight: bold;
  transition: opacity 0.3s;
  flex-wrap: wrap;
}

.egg-effect-pill {
  display: flex;
  align-items: center;
  border-radius: 999px;
  background: #f1f5f9;
  padding: 0.3em 0.8em;
  box-shadow: 0 2px 8px rgba(0,0,0,0.08);
  margin: 0 3px;
  font-size: 1rem;
  white-space: nowrap;
}

.egg-effect-pill .icon {
  margin-right: 0.5em;
  font-size: 1.2em;
}