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

body {
    width: 100vw;
    height: 100vh;
    overflow: hidden;
    background: #000;
    font-family: "Funnel Display", sans-serif;
}

#title-screen {
    position: relative;
    width: 100%;
    height: 100%;
}

#earth-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.title-content {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: #fff;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

h1 {
    font-size: 5rem;
    margin-bottom: 1rem;
}
.subtitle{
    font-size: 1.5rem;
    margin-bottom: 2rem;
}

.play-button {
    font-size: 2rem;
    padding: 1rem 2rem;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.play-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.hidden {
    display: none;
}

.game-layout {
    display: flex;
    width: 100%;
    height: 100vh;
}

.main-area {
    flex: 1;
    position: relative;
    overflow: hidden;
}

.sidebar {
    width: 300px;
    background: rgba(0, 0, 0, 0.3);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
}

.points-container {
    background: rgba(0, 0, 0, 0.2);
    padding: 15px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    
}

.points-display {
    color: #fff;
    font-size: 1.2rem;
    text-align: center;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.upgrade-section {
    display: flex;
    flex-direction: column;
    gap: 10px;
    
}

.upgrade-header {
    color: #fff;
    font-size: 1.3rem;
    font-family: "Funnel Display";
    margin-bottom: 10px;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
    padding-bottom: 5px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.upgrade-button {
    font-family: "Funnel Display";
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 10px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.upgrade-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.upgrade-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.upgrade-button.purchased {
    background: rgba(16, 185, 129, 0.4);
    border-color: rgba(16, 185, 129, 0.8);
}

.upgrade-name {
    font-size: 1.1rem;
    font-weight: bold;
}

.upgrade-description {
    font-size: 0.9rem;
    opacity: 0.8;
}

.upgrade-cost {
    font-size: 0.9rem;
    color: #10b981;
}

.idler-button {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 8px;
    padding: 8px;
    color: white;
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    margin-bottom: 5px;
     font-family: "Funnel Display";
}

.specific-idler{
    width: 20vw;
    font-family: "Funnel Display";
}
.idler-button:hover:not(:disabled) {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.idler-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.idler-name {
    font-size: 1.1rem;
    font-weight: bold;
}

.idler-description {
    font-size: 0.9rem;
    opacity: 0.8;
}

.idler-stats {
    display: flex;
    justify-content: space-between;
    font-size: 0.9rem;
    margin-top: 2px;
}

.idler-owned {
    font-size: 0.9rem;
    opacity: 0.7;
}

.idler-cost {
    font-size: 0.9rem;
    color: #10b981;
}

.specific-idlers-container {
    position: absolute;
    left: 50%;
    bottom: 0%;
    transform: translateX(-50%);
    background: rgba(40, 68, 73, 0.294);
    border-radius: 8px;
    padding: 8px;
    z-index: 100000;
    width:fit-content;

    display: none;              /* make it flexbox */
    flex-direction: row;        /* default, but explicit */
    justify-content: center;    /* optional: center horizontally */
    gap: 8px;                   /* optional: space between items */
}



#decreasers-container {
    position: absolute;
    width: 100%;
    height: 100%;
}


.decreaser-blob {
    position: absolute;
    bottom: 15%;
    transform-origin: bottom center;
    transform: translateX(-50%); /* Center the blob on its position */
    transition: height 0.3s ease;
    cursor: pointer;
    pointer-events: auto;
    z-index: 30;
    transition: all 0.3s ease;
}

.decreaser-blob:hover {

    bottom: 16%;
}



.blob-force-front{
    z-index:31;
}

.blob-body {
    width: 100%;
    height: 100%;
    border-radius: 40% 40% 25% 25%;
    position: relative;
    transform-origin: bottom center;
    animation: blobSway 3s ease-in-out infinite;
}

.blob-eyes {
    position: absolute;
    width: 100%;
    top: 20%;
    display: flex;
    justify-content: space-around;
    padding: 0 20%;
}

.blob-eye {
    width: 15%;
    height: 0;
    padding-bottom: 15%;
    background: rgb(0, 0, 0);
    border-radius: 50%;
    position: relative;
}


.blob-eyebrow {
    position: absolute;
    width: 120%;
    height: 20%;
    background: black;
    
    border-radius: 4px;
}

.eye-l{
    top: -40%;
    right: -10;
    transform:rotate(20deg);

}
.eye-r{
    top: -40%;
    left: -10%;
    transform: rotate(-20deg);
    
}

.blob-counter {
    position: absolute;
    width: 100%;
    text-align: center;
    bottom: 20%;
    color: white;
    font-size: 1.2rem;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.blob-name {
  position: absolute;
  left: 50%;
  bottom: 40%;
  transform: translateX(-50%);
  text-align:center;
  color: white;
  font-size: 1rem;
  text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

@keyframes blobSway {
    0%, 100% { transform: rotate(-2deg); }
    50% { transform: rotate(2deg); }
}

@keyframes clickGlow {
    0% { filter: brightness(1) drop-shadow(0 0 0px rgba(255, 255, 255, 0)); }
    50% { filter: brightness(1.5) drop-shadow(0 0 15px rgba(255, 255, 255, 0.7)); }
    100% { filter: brightness(1) drop-shadow(0 0 0px rgba(255, 255, 255, 0)); }
}

.blob-click {
    animation: clickGlow 0.2s ease-out;
}

.biodiversity-container {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -10%);
    text-align: center;
    width: 80%;
    max-width: 600px;
    z-index: 100;
    transition: all 0.3s ease;
}


.biodiversity-label {
    font-size: 2rem;
    color: #fff;

    margin-bottom: 0.5rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}


.biodiversity-subtitle {
    font-size: 1rem;
    color: #fff;

    margin-top: 0.5rem;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.biodiversity-value {
    font-size: 4rem;
    color: #fff;

    margin-bottom: 1rem;
    font-weight: bold;
    text-shadow: 0 0 10px rgba(0, 0, 0, 0.5);
}

.biodiversity-bar-container {
    width: 100%;
    height: 30px;
    background: rgba(0, 0, 0, 0.3);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}

.biodiversity-bar {
    width: 100%;
    height: 100%;
    background:linear-gradient(90deg,#10b981,#3b82f6);
    transition: width 0.3s ease;
}

/* End screen styles */
.end-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.9);
    z-index: 99999999;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.5s ease;
}

.end-screen.visible {
    opacity: 1;
    pointer-events: auto;
}

.end-screen .biodiversity-container {
    position: absolute;
    top: 10%;
    left: 50%;
    transform: translate(-50%, -10%);
    text-align: center;
    width: 80%;
    max-width: 600px;
    z-index: 100;
    transition: all 0.3s ease;
}

.end-screen-title {
    color: #fff;
    font-size: 4rem;
    margin-bottom: 1rem;
    text-align: center;
    font-family: "Funnel Display", sans-serif;
}

.end-screen-subtitle {
    color: #fff;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    text-align: center;
    font-family: "Funnel Display", sans-serif;
}


.restart-button {
    font-size: 2rem;
    padding: 1rem 2rem;
    margin-top: 2rem;
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: "Funnel Display", sans-serif;
}

.restart-button:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

/* Dead blob styles */
.decreaser-blob.dead .blob-eye::after {
    content: "X";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-weight: bold;
    font-size: 1.2em;
    color: black;
}
.decreaser-blob.dead .blob-eye{
    width: 0%;
    height: 0;
    padding-bottom: 15%;
    background: transparent;
    color:#000;
    content:"X";
    border-radius: 50%;
    position: relative;
}




.decreaser-blob.dead .blob-eyebrow {
    display: none;
}

.tooltip {
    position: fixed;
    background: rgba(0, 0, 0, 0.9);
    color: white;
    padding: 10px;
    border-radius: 6px;
    white-space: pre-wrap;
    word-wrap: break-word;
    overflow-wrap: anywhere;
    
    font-size: 14px;
    z-index: 1000000;
    pointer-events: none;
    max-width: 300px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(5px);
    display: none;
    font-family: "Funnel Display", sans-serif;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}