/* UI Components CSS */

/* Main Container */
#pet-container {
    position: relative;
    width: 320px;
    padding: 16px;
    background: linear-gradient(180deg, #2d2d44 0%, #1a1a2e 100%);
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    user-select: none;
}

/* Status Bars */
#status-bars {
    margin-top: 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.stat-bar {
    display: flex;
    align-items: center;
    gap: 8px;
}

.stat-label {
    font-size: 14px;
    width: 20px;
    text-align: center;
}

.bar-container {
    flex: 1;
    height: 12px;
    background: #1a1a2e;
    border: 2px solid #444;
    border-radius: 2px;
    overflow: hidden;
}

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

.bar-fill.hunger {
    background: linear-gradient(90deg, #ff6b6b, #ff8e53);
}

.bar-fill.happiness {
    background: linear-gradient(90deg, #ffd93d, #ffaa00);
}

.bar-fill.energy {
    background: linear-gradient(90deg, #6bcb77, #4ecdc4);
}

.stat-value {
    font-size: 10px;
    width: 28px;
    text-align: right;
    color: #888;
}

/* Level Info */
#level-info {
    margin-top: 12px;
    padding: 8px;
    background: #1a1a2e;
    border: 2px solid #444;
    border-radius: 4px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

#level-badge {
    font-size: 12px;
    font-weight: bold;
    color: #ffd93d;
    text-shadow: 0 0 10px rgba(255, 217, 61, 0.5);
}

#species-name {
    font-size: 14px;
    color: #aaa;
    text-transform: capitalize;
}

.xp-bar-container {
    height: 8px;
    background: #0a0a14;
    border-radius: 2px;
    overflow: hidden;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #9b59b6, #8e44ad);
    transition: width 0.5s ease;
}

.xp-text {
    font-size: 10px;
    color: #888;
    text-align: center;
}

/* Mood Display */
#mood-display {
    margin-top: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}

#mood-emoji {
    font-size: 24px;
}

#mood-text {
    font-size: 12px;
    color: #ccc;
    text-transform: capitalize;
}

/* Action Buttons */
#action-buttons {
    margin-top: 16px;
    display: flex;
    gap: 8px;
    justify-content: center;
}

.pixel-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 8px 12px;
    background: linear-gradient(180deg, #4a4a6a 0%, #3a3a5a 100%);
    border: 3px solid #5a5a7a;
    border-radius: 4px;
    color: #eee;
    cursor: pointer;
    transition: all 0.1s ease;
    min-width: 60px;
}

.pixel-btn:hover {
    background: linear-gradient(180deg, #5a5a7a 0%, #4a4a6a 100%);
    border-color: #6a6a8a;
    transform: translateY(-2px);
}

.pixel-btn:active {
    background: linear-gradient(180deg, #3a3a5a 0%, #2a2a4a 100%);
    border-color: #4a4a6a;
    transform: translateY(0);
}

.pixel-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-icon {
    font-size: 20px;
}

.btn-text {
    font-size: 10px;
    text-transform: uppercase;
}

/* Speech Bubble */
#speech-bubble {
    position: absolute;
    top: 16px;
    right: 16px;
    background: white;
    color: #333;
    padding: 8px 12px;
    border-radius: 12px;
    font-size: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
    max-width: 150px;
    z-index: 10;
}

#speech-bubble::after {
    content: "";
    position: absolute;
    bottom: -8px;
    left: 20px;
    border: 8px solid transparent;
    border-top-color: white;
    border-bottom: none;
}

#speech-bubble.hidden {
    display: none;
}

/* Achievement Notification */
#achievement-notification {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: linear-gradient(135deg, #ffd700 0%, #ffaa00 100%);
    color: #1a1a2e;
    padding: 16px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(255, 215, 0, 0.4);
    z-index: 100;
    animation: notification-pop 0.3s ease;
}

@keyframes notification-pop {
    0% { transform: translate(-50%, -50%) scale(0.5); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

#achievement-notification.hidden {
    display: none;
}

.achievement-icon {
    font-size: 32px;
}

.achievement-content {
    display: flex;
    flex-direction: column;
}

.achievement-title {
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.achievement-name {
    font-size: 14px;
    font-weight: bold;
}

/* Level Up Notification */
#levelup-notification {
    position: absolute;
    top: 20%;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, #9b59b6 0%, #8e44ad 100%);
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 20px rgba(155, 89, 182, 0.4);
    z-index: 100;
    animation: levelup-bounce 0.5s ease;
}

@keyframes levelup-bounce {
    0%, 100% { transform: translateX(-50%) translateY(0); }
    50% { transform: translateX(-50%) translateY(-10px); }
}

#levelup-notification.hidden {
    display: none;
}

.levelup-icon {
    font-size: 24px;
}

.levelup-text {
    font-size: 16px;
    font-weight: bold;
}

/* Utility classes */
.hidden {
    display: none !important;
}

.text-center {
    text-align: center;
}

.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }

.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
