body {
    background-color: #E6F0FA;
    background-image: linear-gradient(to bottom, #FFFFFF 0%, #E6F0FA 300px);
    background-repeat: no-repeat;
    font-family: "Lucida Grande", Tahoma, Arial, sans-serif;
    color: #333333;
    display: flex;
    justify-content: center;
    padding-top: 40px;
    margin: 0;
    padding-bottom: 40px;
}

.container {
    background-color: #FFFFFF;
    width: 440px;
    border-radius: 12px;
    box-shadow: 0px 4px 15px rgba(0, 0, 0, 0.15);
    border: 1px solid #CCCCCC;
    overflow: hidden;
    text-align: center;
}

.header {
    background: linear-gradient(to bottom, #f3f3f3 0%, #d7d7d7 100%);
    border-bottom: 1px solid #B0B0B0;
    padding: 10px 0;
}

h1 {
    margin: 0;
    font-size: 22px;
    color: #444444;
    text-shadow: 1px 1px 0px #FFFFFF;
}

.content {
    padding: 20px;
}

/* Pet container with click effect */
.pet-container {
    position: relative;
    display: inline-block;
}

#tung-img {
    width: 220px;
    height: 220px;
    border-radius: 8px;
    border: 3px solid #E0E0E0;
    cursor: pointer;
    box-shadow: 0px 2px 5px rgba(0,0,0,0.1);
    transition: transform 0.1s;
    -webkit-user-select: none;
    user-select: none;
    -webkit-user-drag: none;
}

#tung-img:active {
    transform: scale(0.97);
}

#tung-img.dead {
    filter: grayscale(100%);
    pointer-events: none;
}

/* Click popup effect */
#click-fx {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.click-popup {
    position: absolute;
    top: 30%;
    left: 50%;
    transform: translateX(-50%);
    color: #4CAF50;
    font-weight: bold;
    font-size: 18px;
    pointer-events: none;
    animation: floatUp 0.6s ease-out forwards;
}

@keyframes floatUp {
    0% { opacity: 1; transform: translateX(-50%) translateY(0); }
    100% { opacity: 0; transform: translateX(-50%) translateY(-60px); }
}

/* Stats panel */
.stats-panel {
    background-color: #F8F8F8;
    border: 1px solid #E0E0E0;
    border-radius: 8px;
    padding: 10px 15px;
    margin: 15px auto;
    width: 80%;
    text-align: left;
}

.stats-panel h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    border-bottom: 1px dotted #CCCCCC;
    padding-bottom: 5px;
    color: #666;
}

.stat-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    font-size: 13px;
    margin-bottom: 6px;
    gap: 8px;
}

.stat-row span:first-child {
    min-width: 75px;
}

.stat-row strong {
    min-width: 35px;
    text-align: right;
}

/* Stat bars */
.stat-bar {
    flex: 1;
    height: 8px;
    background-color: #E0E0E0;
    border-radius: 4px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    border-radius: 4px;
    transition: width 0.3s ease;
}

.health-fill { background: linear-gradient(to right, #e74c3c, #2ecc71); }
.hunger-fill { background: linear-gradient(to right, #e67e22, #f1c40f); }
.hygiene-fill { background: linear-gradient(to right, #95a5a6, #3498db); }
.happiness-fill { background: linear-gradient(to right, #e91e63, #9b59b6); }

/* Status box */
#status-box {
    background-color: #FFFFE0;
    border: 1px solid #F0E68C;
    padding: 10px;
    border-radius: 6px;
    font-size: 14px;
    margin-bottom: 15px;
    color: #555;
    min-height: 20px;
}

/* Buttons */
.glossy-btn {
    border: 1px solid #888;
    border-radius: 20px;
    padding: 8px 18px;
    font-weight: bold;
    font-size: 13px;
    color: white;
    cursor: pointer;
    text-shadow: 1px 1px 0px rgba(0,0,0,0.3);
    margin: 0 3px 8px 3px;
    outline: none;
}

.glossy-btn:focus-visible {
    box-shadow: 0 0 0 3px rgba(66, 153, 225, 0.5);
}

.glossy-btn.green {
    background: linear-gradient(to bottom, #88d068 0%, #599f3b 50%, #46862b 51%, #5eb43d 100%);
    border-color: #3b7322;
}

.glossy-btn.blue {
    background: linear-gradient(to bottom, #7db9e8 0%, #2989d8 50%, #1e5799 51%, #3b9ce0 100%);
    border-color: #1a4f8b;
}

.glossy-btn.orange {
    background: linear-gradient(to bottom, #f5d070 0%, #e09d29 50%, #d68318 51%, #e6a735 100%);
    border-color: #a6620c;
}

.glossy-btn.purple {
    background: linear-gradient(to bottom, #c39bd3 0%, #8e44ad 50%, #7d3c98 51%, #a569bd 100%);
    border-color: #6c3483;
}

.glossy-btn.pink {
    background: linear-gradient(to bottom, #f5b7b1 0%, #e74c3c 50%, #cb4335 51%, #ec7063 100%);
    border-color: #a93226;
}

.glossy-btn.gold {
    background: linear-gradient(to bottom, #f9e79f 0%, #d4ac0d 50%, #b7950b 51%, #f4d03f 100%);
    border-color: #9a7d0a;
    color: #333;
    text-shadow: none;
}

.glossy-btn.teal {
    background: linear-gradient(to bottom, #76d7c4 0%, #1abc9c 50%, #16a085 51%, #48c9b0 100%);
    border-color: #0e6655;
}

.glossy-btn.dark {
    background: linear-gradient(to bottom, #7f8c8d 0%, #2c3e50 50%, #1a252f 51%, #34495e 100%);
    border-color: #1a252f;
}

.glossy-btn:active {
    opacity: 0.8;
}

.glossy-btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* Shop section */
.shop-section {
    margin-top: 10px;
}

.shop-section h3 {
    font-size: 14px;
    color: #888;
    margin: 5px 0 8px 0;
}

/* Upgrades section */
.upgrades-section {
    margin-top: 15px;
    padding-top: 10px;
    border-top: 1px dotted #CCC;
}

.upgrades-section h3 {
    font-size: 14px;
    color: #888;
    margin: 5px 0 8px 0;
}

.upgrades-section .glossy-btn {
    font-size: 12px;
    padding: 7px 14px;
}

/* Event log */
.event-log {
    margin-top: 15px;
    max-height: 150px;
    overflow-y: auto;
}

.event-log h3 {
    font-size: 14px;
}

.log-entry {
    font-size: 12px;
    color: #888;
    padding: 2px 0;
    border-bottom: 1px solid #f0f0f0;
}

.log-entry:first-child {
    color: #555;
    font-weight: bold;
}

/* Footer */
.footer {
    background-color: #F5F5F5;
    border-top: 1px solid #E0E0E0;
    padding: 15px;
    font-size: 11px;
    color: #888;
}

.footer a {
    color: #2989d8;
    text-decoration: none;
}

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

/* Mobile responsive */
@media (max-width: 480px) {
    body {
        padding-top: 10px;
    }
    .container {
        width: 95%;
        border-radius: 8px;
    }
    #tung-img {
        width: 180px;
        height: 180px;
    }
    .glossy-btn {
        font-size: 12px;
        padding: 7px 12px;
    }
}
