/* Demo Panel Content */
.profile-demo {
    padding: 2rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.profile-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 2rem;
}

.profile-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--gradient-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
}

.profile-info h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.profile-info p {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

.profile-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-top: auto;
    margin-bottom: 2rem; /* Added margin for button */
}

.stat-item {
    text-align: center;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 12px;
}

.stat-value {
    display: block;
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--primary-color);
    margin-bottom: 0.25rem;
}

.stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.profile-action-btn,
.health-action-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    cursor: pointer;
    background: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
}

.profile-action-btn:hover,
.health-action-btn:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
}

.health-demo {
    padding: 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
}

.health-chart-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.health-metrics {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.metric {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem;
    background: var(--bg-secondary);
    border-radius: 8px;
}

.metric i {
    color: var(--primary-color);
}

.health-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-top: auto;
}

.health-action-btn {
    padding: 0.5rem;
    font-size: 0.75rem;
    background-color: var(--bg-secondary);
    color: var(--text-secondary);
}

.health-action-btn:hover {
    background: var(--primary-color);
    color: white;
}

.avatar-demo-3d {
    padding: 2rem 1.5rem;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

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

.avatar-3d {
    position: relative;
    margin-bottom: 2rem;
}

.avatar-model {
    font-size: 4rem;
    animation: avatarFloat 3s ease-in-out infinite; /* Default floating animation */
    transition: transform 0.2s ease-out; /* Smooth transition for emotion-triggered changes */
}

/* Specific avatar model animations for emotions */
.avatar-model.happy-avatar {
    transform: translateY(-5px) rotate(3deg) scale(1.05);
}

.avatar-model.sad-avatar {
    transform: translateY(5px) rotate(-3deg) scale(0.95);
}

.avatar-model.excited-avatar {
    animation: excitedJiggle 0.3s infinite;
}

@keyframes excitedJiggle {
    0% { transform: rotate(0deg); }
    25% { transform: rotate(5deg); }
    50% { transform: rotate(0deg); }
    75% { transform: rotate(-5deg); }
    100% { transform: rotate(0deg); }
}

@keyframes avatarFloat {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-10px) rotate(5deg); }
}

.emotion-indicator {
    position: absolute;
    top: -10px;
    right: -10px;
    font-size: 1.5rem;
    animation: emotionBounce 1s ease-out;
}

@keyframes emotionBounce {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.avatar-controls {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.emotion-btn {
    width: 50px;
    height: 50px;
    border: none;
    border-radius: 50%;
    background: var(--bg-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.emotion-btn:hover {
    transform: scale(1.1);
    background: var(--primary-color);
}

/* GPS Demo Panel Styles */
.gps-demo {
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    background-color: #f3f4f6;
}

.gps-map {
    flex-grow: 1;
    background: url('https://media.wired.com/photos/59269cd37034dc5f91bec0f1/master/w_2560%2Cc_limit/GoogleMapTA.jpg') center center/cover;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pet-location-marker {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(99, 102, 241, 0.3);
    border: 2px solid white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    position: relative;
    animation: mapMarkerPulse 2s infinite;
}

@keyframes mapMarkerPulse {
    0% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(99, 102, 241, 0); }
    100% { box-shadow: 0 0 0 0 rgba(99, 102, 241, 0); }
}

.pet-location-marker.pinging::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: white;
    animation: pingEffect 1s ease-out forwards;
}

@keyframes pingEffect {
    0% { transform: scale(1); opacity: 0.7; }
    100% { transform: scale(3); opacity: 0; }
}


.gps-info-box {
    background: white;
    padding: 1rem;
    border-top: 1px solid var(--border-color);
}

.tracker-info {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
}

.tracker-image {
    width: 50px;
    height: 50px;
    object-fit: contain;
}

.tracker-info h4 {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.tracker-info p {
    font-size: 0.875rem;
    color: var(--text-secondary);
}

.gps-action-btn {
    width: 100%;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    background: var(--primary-color);
    color: white;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.gps-action-btn:hover {
    background: var(--primary-dark);
}