


.playground-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    text-align: center;
}

.playground-container h1 {
    color: #4CAF50;
    margin-bottom: 20px;
}

.playground-area {
    width: 70%;
    height: calc(100vh - 60px);
    position: relative;
    overflow: hidden;
    background-color: #f5f5f5;
    box-sizing: border-box;
    margin-top: 0; 

    border-top: none; 

}

.bug {
    position: absolute;
    width: 75px;
    height: 75px;
    user-select: none;
    pointer-events: none;
}

.bug-toy {
    width: 75px;
    height: 75px;
    position: absolute;
    cursor: pointer;
    transition: transform 0.2s ease;
    user-select: none;
}

.bug-toy:hover {
    transform: scale(1.1);
}

.bug-house {
    width: 150px;
    height: 100px;
    background-color: #8d6e63;
    border-radius: 10px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.bug-house:before {
    content: '';
    position: absolute;
    top: -40px;
    left: 25px;
    width: 100px;
    height: 60px;
    background-color: #a1887f;
    clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
}



.ball {
    position: absolute;
    pointer-events: none;
    object-fit: cover;
    border-radius: 50%;
    box-shadow: 0 3px 6px rgba(0,0,0,0.3), inset 0 -2px 5px rgba(0,0,0,0.2);
    z-index: 5; 

    transition: transform 0.05s linear; 

}



@keyframes gentleBounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-2px); }
}

.ball.gentle-bounce {
    animation: gentleBounce 0.8s infinite;
}



.notification-popup {
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
    font-size: 14px;
    max-width: 80%;
    text-align: center;
}



.pet-ui {
    width: 30%;
    height: calc(100vh - 60px);
    background-color: #fff;
    padding: 20px;
    box-shadow: -2px 0 10px rgba(0,0,0,0.1);
    overflow-y: auto;
    box-sizing: border-box;
    border-top: none; 

    margin-top: 0; 

    margin-top: 12px; 

}

@media (max-width: 768px) {
    .pet-ui {
        margin-top: 8px;
    }
}

.pet-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.pet-info h2 {
    margin: 0;
    color: #4CAF50;
}

#rename-pet {
    padding: 5px 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 3px;
    cursor: pointer;
}

.pet-stats {
    margin-bottom: 20px;
}

.stat-container {
    margin-bottom: 10px;
}

.progress-bar {
    width: 100%;
    height: 20px;
    background-color: #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    margin: 5px 0;
}

.progress-fill {
    height: 100%;
    width: 100%;
    transition: width 0.3s ease;
}

.health {
    background-color: #4CAF50;
}

.hunger {
    background-color: #FF9800;
}

.thirst {
    background-color: #2196F3;
}

.happiness {
    background-color: #E91E63;
}

.pet-actions {
    margin-bottom: 20px;
}

.pet-actions h3 {
    margin-top: 0;
    color: #555;
}

.pet-actions button {
    padding: 8px 15px;
    margin-right: 10px;
    margin-bottom: 10px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}



#ball-pet {
    background-color: #ff9800; 

}

#ball-pet:hover {
    background-color: #f57c00;
}

.pet-actions button:hover {
    background-color: #45a049;
}

.pet-inventory h3 {
    margin-top: 0;
    color: #555;
}

.inventory-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
    margin-bottom: 15px;
}

.inventory-item {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 5px;
    padding: 10px;
    text-align: center;
    cursor: pointer;
}

.inventory-item img {
    width: 30px;
    height: 30px;
    object-fit: contain;
    margin-bottom: 5px;
}

.inventory-item .item-name {
    font-size: 12px;
    margin-bottom: 5px;
}

.inventory-item .item-quantity {
    font-size: 11px;
    color: #777;
}

.inventory-info {
    background-color: #f5f5f5;
    padding: 10px;
    border-radius: 5px;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.7);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 20px;
    border-radius: 10px;
    width: 80%;
    max-width: 600px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close-button {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close-button:hover {
    color: #000;
}

.shop-items {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
    margin-top: 20px;
}

.shop-item {
    background: linear-gradient(180deg, var(--panel-bg-start), var(--panel-bg-mid));
    border: 1px solid var(--panel-border);
    border-radius: 8px;
    padding: 15px;
    text-align: center;
    transition: transform 0.3s ease;
    box-shadow: 0 2px 8px var(--panel-shadow);
}

.shop-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 5px 15px var(--panel-shadow);
}

.shop-item img {
    width: 50px;
    height: 50px;
    object-fit: contain;
    margin-bottom: 10px;
}

.shop-item .item-name {
    font-weight: bold;
    margin-bottom: 5px;
}

.shop-item .item-price {
    color: var(--primary-blue);
    margin-bottom: 10px;
}

.shop-item button {
    background: linear-gradient(180deg, var(--panel-accent-a), var(--panel-accent-b));
    color: inherit;
    border: none;
    padding: 8px 10px;
    border-radius: 6px;
    cursor: pointer;
}

.shop-item button:hover {
    filter: brightness(1.04);
}

.shop-item button:disabled {
    background-color: #cccccc;
    cursor: not-allowed;
}

/* Status icon styles */
.status-icon {
    position: absolute;
    top: -20px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 16px;
    background-color: white;
    border-radius: 50%;
    padding: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 10;
}

/* Animation for bugs */
@keyframes bounce {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(5deg); }
}

.bouncing {
    animation: bounce 2s infinite;
}

/* Bug message style */
.bug-message {
    position: absolute;
    background-color: white;
    padding: 5px 10px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 100;
    pointer-events: none;
    font-size: 14px;
    white-space: nowrap;
    opacity: 0;
    transform: translateY(10px);
    animation: fadeIn 0.3s forwards;
}

@keyframes fadeIn {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.bug-message.hiding {
    animation: fadeOut 0.3s forwards;
}



body > main {
    border-top: none !important; 

    background-image: none !important; 

}



header + main {
    margin-top: 0;
    padding-top: 60px; 

}

/* Dev button styling */
.dev-button {
    background-color: #9c27b0 !important; /* Purple background */
    color: white !important;
    border: 2px solid #6a1b9a !important;
    font-weight: bold !important;
    position: relative;
    overflow: hidden;
}

.dev-button:hover {
    background-color: #6a1b9a !important; 

}



.dev-button[style*="d32f2f"] {
    background-color: #d32f2f !important; /* Red background */
    color: white !important;
    border: 2px solid #b71c1c !important;
}

.dev-button[style*="d32f2f"]:hover {
    background-color: #b71c1c !important; 

    box-shadow: 0 0 8px rgba(255, 0, 0, 0.5) !important;
}

/* Bug Customization Styles */
.bug-customization-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.bug-customization-container {
    background-color: #fff;
    border-radius: 10px;
    width: 90%;
    max-width: 800px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.bug-icon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 10px;
    max-height: 300px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    margin-bottom: 10px;
}

.bug-icon-container {
    position: relative;
    cursor: pointer;
    border-radius: 5px;
    overflow: hidden;
    width: 80px;
    height: 80px;
}

.bug-icon {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 5px;
}

.selected-indicator {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(76, 175, 80, 0.3);
    border: 3px solid #4CAF50;
    border-radius: 5px;
    box-sizing: border-box;
    display: none;
}

.random-button {
    margin-top: 5px;
    padding: 5px 10px;
    background-color: #9c27b0;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
}

.submit-button {
    padding: 10px 20px;
    background-color: #4CAF50;
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.submit-button:hover {
    background-color: #45a049;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}



body.theme-light header .button-tray {
    justify-content: center;
    width: 100%;
    min-width: 0;
    flex-wrap: wrap;
}

/* Moved from inline <style> in playground.html and scoped to this page only */
body.playground-page,
body.playground-page button,
body.playground-page div,
body.playground-page p,
body.playground-page h1,
body.playground-page h2,
body.playground-page h3,
body.playground-page h4,
body.playground-page h5,
body.playground-page h6,
body.playground-page input,
body.playground-page textarea,
body.playground-page select,
body.playground-page option {
    font-family: "Comic Sans MS", "Comic Sans", "Balsamiq Sans", "Patrick Hand", "Architects Daughter", "Chalkboard SE", "Comic Neue", cursive !important;
    font-size: 101% !important;
}

/* Ensure header buttons share the same font (match Return to Bugs) */
header .button-tray button,
header .button-tray a.nav-btn {
    font-family: 'Comic Sans Fallback', "Comic Sans MS", "Comic Sans", "Balsamiq Sans", "Patrick Hand", "Architects Daughter", "Chalkboard SE", "Comic Neue", cursive !important;
    font-size: 101% !important;
}

body.playground-page .button-tray {
    justify-content: center;
    padding: 10px 0;
    text-align: center;
    display: flex;
    width: 100%;
    height: auto;
}

body.playground-page main {
    min-height: calc(100vh - 60px);
    padding-top: 60px;
    box-sizing: border-box;
    margin: 0;
    display: flex;
    border-top: none;
}

body.playground-page footer {
    display: none !important;
}

body.playground-page #return-button {
    margin: 0 auto;
    display: block;
}

body.playground-page a {
    text-decoration: none !important;
}

body.playground-page header {
    height: 60px;
    padding: 0;
    background-color: #f8f9fa;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    width: 100%;
    display: flex;
    align-items: center;
    border-bottom: none;
}

body.playground-page {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* .playground-area and .pet-ui rules already exist above; not duplicated here */
